Repository navigation
[CI] CI fix sweep for 8.1 - #5441
valkeyrie-ops[bot] wants to merge 1 commit into
Conversation
|
Pushed 7bd6b8b with a fix for The test let all three replicas wait for their election at once, and two of them started in the same epoch and split the votes. The patch lets the replicas of the lowest and highest failed primary rank fail over first and enables the middle one once they are primaries. The failing test passed 29 loops with the fix, and the bot's review approved it. Diagnosis and checksWhat failed: test-sanitizer-address: [err] Primaries will not time out then they are elected in the same epoch in tests/unit/cluster/failover2.tcl (No failover detected) Root cause: After all nodes marked the three paused primaries as FAIL, the replicas scheduled their elections with delays of 949 ms (primary rank 0), 1483 ms (rank 1) and 1508 ms (rank 2). The rank 0 replica won epoch 11 at 09:54:47.263. The other two learned of it at 47.346 and 47.347, and both logged 'Failed primary rank updated, added -500 milliseconds of delay'. That put both of their delays in the past, so both started an election for epoch 12 within a millisecond of each other. The five voters split 3 to 2 with a quorum of 4, so neither won. On 8.1 a split vote with no winner is only resolved by the failover auth timeout, which is 30 s with cluster-node-timeout 15000, followed by a 60 s retry, so the 50 s wait for the three replicas to become primaries failed. The failure is flaky. The fix: The earlier fix on this branch already makes every node see all three primaries as FAIL before the replicas may fail over, but it cannot stop the delays of two waiting replicas from being cut at the same moment when the first one wins. The patch keeps cluster-replica-no-failover on the replica of the middle rank until the other two are primaries. The lowest and highest ranked replicas have delays more than 500 ms apart, and when the first wins only one replica is left to have its delay shortened, so it starts alone in a new epoch. The middle replica then runs its election alone. The test still runs two failovers concurrently, with one replica waiting in its delay while the other wins, so the epoch 0 check and the failover timeout check still have something to check. No assertion or timeout was changed. The rank order is taken from CLUSTER MYSHARDID, which is what clusterGetFailedPrimaryRank compares. A product change is not appropriate here: the only upstream change that resolves split votes is the FAILOVER_AUTH_NACK feature, which adds a new cluster bus message and is not a backport candidate. What the bot checked
The agent's own notesNot run here. The default branch does not have this change and does not need it: f2c1c5e (#3833) rewrote the test there with DEBUG CLUSTER-FAILOVER-DELAY and CLUSTER-FAILOVER-EPOCH and resolves split votes with FAILOVER_AUTH_NACK, none of which exists on 8.1. Of the other release branch commits, only baf141d on 9.1 touches this test. It is the same change this branch already has as fc5180e (wait for FAIL on all nodes, then enable failover on all three replicas), and this failure happened with it in place, so no commit there fits. 9.1 still has the same test body and looks exposed to the same collision, so it likely needs this change too. The 8.0 and 9.0 commits fix other tests in the file. Open PR #4296 only changes which jobs run the solo tests and does not fix this. The content of the reverted 793799d was not available, so I could not check whether it took a similar approach. The log does not show why the two replicas acted within the same millisecond; I assume their cluster cron ticks happened to line up, and the patch does not depend on that. The trade-off is that the third replica no longer competes with the other two, which is the price of removing a vote split that 8.1 cannot recover from without the timeout the test forbids. #5075's CI decides whether the fix holds once this is merged, and the bot never merges. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
After all nodes marked the three paused primaries as FAIL, the replicas scheduled their elections with delays of 949 ms (primary rank 0), 1483 ms (rank 1) and 1508 ms (rank 2). The rank 0 replica won epoch 11 at 09:54:47.263. The other two learned of it at 47.346 and 47.347, and both logged 'Failed primary rank updated, added -500 milliseconds of delay'. That put both of their delays in the past, so both started an election for epoch 12 within a millisecond of each other. The five voters split 3 to 2 with a quorum of 4, so neither won. On 8.1 a split vote with no winner is only resolved by the failover auth timeout, which is 30 s with cluster-node-timeout 15000, followed by a 60 s retry, so the 50 s wait for the three replicas to become primaries failed. The earlier fix on this branch already makes every node see all three primaries as FAIL before the replicas may fail over, but it cannot stop the delays of two waiting replicas from being cut at the same moment when the first one wins. The patch keeps cluster-replica-no-failover on the replica of the middle rank until the other two are primaries. The lowest and highest ranked replicas have delays more than 500 ms apart, and when the first wins only one replica is left to have its delay shortened, so it starts alone in a new epoch. The middle replica then runs its election alone. The test still runs two failovers concurrently, with one replica waiting in its delay while the other wins, so the epoch 0 check and the failover timeout check still have something to check. No assertion or timeout was changed. The rank order is taken from CLUSTER MYSHARDID, which is what clusterGetFailedPrimaryRank compares. A product change is not appropriate here: the only upstream change that resolves split votes is the FAILOVER_AUTH_NACK feature, which adds a new cluster bus message and is not a backport candidate. CI-Fix-Job: test-sanitizer-address CI-Fix-Run: https://github.com/valkey-io/valkey/actions/runs/43843157739
7bd6b8b to
1b59f13
Compare
…lkey-io#5441) After all nodes marked the three paused primaries as FAIL, the replicas scheduled their elections with delays of 949 ms (primary rank 0), 1483 ms (rank 1) and 1508 ms (rank 2). The rank 0 replica won epoch 11 at 09:54:47.263. The other two learned of it at 47.346 and 47.347, and both logged 'Failed primary rank updated, added -500 milliseconds of delay'. That put both of their delays in the past, so both started an election for epoch 12 within a millisecond of each other. The five voters split 3 to 2 with a quorum of 4, so neither won. On 8.1 a split vote with no winner is only resolved by the failover auth timeout, which is 30 s with cluster-node-timeout 15000, followed by a 60 s retry, so the 50 s wait for the three replicas to become primaries failed. The earlier fix on this branch already makes every node see all three primaries as FAIL before the replicas may fail over, but it cannot stop the delays of two waiting replicas from being cut at the same moment when the first one wins. The patch keeps cluster-replica-no-failover on the replica of the middle rank until the other two are primaries. The lowest and highest ranked replicas have delays more than 500 ms apart, and when the first wins only one replica is left to have its delay shortened, so it starts alone in a new epoch. The middle replica then runs its election alone. The test still runs two failovers concurrently, with one replica waiting in its delay while the other wins, so the epoch 0 check and the failover timeout check still have something to check. No assertion or timeout was changed. The rank order is taken from CLUSTER MYSHARDID, which is what clusterGetFailedPrimaryRank compares. A product change is not appropriate here: the only upstream change that resolves split votes is the FAILOVER_AUTH_NACK feature, which adds a new cluster bus message and is not a backport candidate. CI-Fix-Job: test-sanitizer-address CI-Fix-Run: https://github.com/valkey-io/valkey/actions/runs/43843157739 Backport-Source-PR: 5441
|
Dropped from this PR on the sweep's new head:
Closing: no fix is left. |
) After all nodes marked the three paused primaries as FAIL, the replicas scheduled their elections with delays of 949 ms (primary rank 0), 1483 ms (rank 1) and 1508 ms (rank 2). The rank 0 replica won epoch 11 at 09:54:47.263. The other two learned of it at 47.346 and 47.347, and both logged 'Failed primary rank updated, added -500 milliseconds of delay'. That put both of their delays in the past, so both started an election for epoch 12 within a millisecond of each other. The five voters split 3 to 2 with a quorum of 4, so neither won. On 8.1 a split vote with no winner is only resolved by the failover auth timeout, which is 30 s with cluster-node-timeout 15000, followed by a 60 s retry, so the 50 s wait for the three replicas to become primaries failed. The earlier fix on this branch already makes every node see all three primaries as FAIL before the replicas may fail over, but it cannot stop the delays of two waiting replicas from being cut at the same moment when the first one wins. The patch keeps cluster-replica-no-failover on the replica of the middle rank until the other two are primaries. The lowest and highest ranked replicas have delays more than 500 ms apart, and when the first wins only one replica is left to have its delay shortened, so it starts alone in a new epoch. The middle replica then runs its election alone. The test still runs two failovers concurrently, with one replica waiting in its delay while the other wins, so the epoch 0 check and the failover timeout check still have something to check. No assertion or timeout was changed. The rank order is taken from CLUSTER MYSHARDID, which is what clusterGetFailedPrimaryRank compares. A product change is not appropriate here: the only upstream change that resolves split votes is the FAILOVER_AUTH_NACK feature, which adds a new cluster bus message and is not a backport candidate. CI-Fix-Job: test-sanitizer-address CI-Fix-Run: https://github.com/valkey-io/valkey/actions/runs/43843157739 Backport-Source-PR: 5441
The agent's commits were made as valkeyrie-bot[bot], a name with no GitHub account behind it, and most had no DCO sign-off. Its own fixes and repair commits had none, and a backport kept only what its upstream commit carried: sometimes nothing, sometimes a sign-off under another email than its author's. The DCO check therefore fails on the sweep pull requests (valkey-io/valkey#5619, valkey-io/valkey#5499), on the CI-sweep pull requests (valkey-io/valkey#5441) and on the fixes opened into unstable (valkey-io/valkey#5437, valkey-io/valkey#5440, valkey-io/valkey#5443), and a maintainer has to override it. Every commit the agent makes is now committed and signed off by valkeyrie-ops[bot], the App that opens its pull requests. The identity and the sign-off line are in scripts/common/identity.py, and proc.set_commit_identity gives them to a clone. - A commit the agent writes (a CI fix, a sweep's repair commit, a revert, a release cut) has the App as its author. - A commit it cherry-picks (a backport, an upstream fix ported to a backport branch) keeps its author and its own sign-off, and gets the App's as its committer. The DCO check takes a sign-off from a commit's author or its committer. - An open sweep branch from before this is signed off once, the next time it is rebased. Other open pull requests keep their commits. The pull requests the CI-fix bot opens now say that their commit carries the bot's sign-off and that a maintainer adds their own before merging. Nothing checks for the maintainer's. The registry edit that onboards a release branch is unchanged: it is github-actions[bot]'s commit and is already signed off. Signed-off-by: Sarthak Aggarwal <[email protected]>
* Sign off every commit the agent makes as valkeyrie-ops The agent's commits were made as valkeyrie-bot[bot], a name with no GitHub account behind it, and most had no DCO sign-off. Its own fixes and repair commits had none, and a backport kept only what its upstream commit carried: sometimes nothing, sometimes a sign-off under another email than its author's. The DCO check therefore fails on the sweep pull requests (valkey-io/valkey#5619, valkey-io/valkey#5499), on the CI-sweep pull requests (valkey-io/valkey#5441) and on the fixes opened into unstable (valkey-io/valkey#5437, valkey-io/valkey#5440, valkey-io/valkey#5443), and a maintainer has to override it. Every commit the agent makes is now committed and signed off by valkeyrie-ops[bot], the App that opens its pull requests. The identity and the sign-off line are in scripts/common/identity.py, and proc.set_commit_identity gives them to a clone. - A commit the agent writes (a CI fix, a sweep's repair commit, a revert, a release cut) has the App as its author. - A commit it cherry-picks (a backport, an upstream fix ported to a backport branch) keeps its author and its own sign-off, and gets the App's as its committer. The DCO check takes a sign-off from a commit's author or its committer. - An open sweep branch from before this is signed off once, the next time it is rebased. Other open pull requests keep their commits. The pull requests the CI-fix bot opens now say that their commit carries the bot's sign-off and that a maintainer adds their own before merging. Nothing checks for the maintainer's. The registry edit that onboards a release branch is unchanged: it is github-actions[bot]'s commit and is already signed off. Signed-off-by: Sarthak Aggarwal <[email protected]> * Pass the App's identity with each commit command A sweep commits in the clone its validation builds and tests in, and git took the committer, and the name `commit -s` signs with, from that clone's config, set once after cloning. A test that rewrote the config changed whose commit and sign-off the next one was. Every git command that commits now gets the identity in its environment (proc.commit_env), which git reads before any config, and a clone is no longer given one. A cherry-pick, a rebase and an amend still keep the commit's author. A CI fix written before the sign-offs keeps its unsigned commit when its CI-sweep branch is rebuilt. The docs now say so. Signed-off-by: Sarthak Aggarwal <[email protected]> --------- Signed-off-by: Sarthak Aggarwal <[email protected]>
CI fix sweep for 8.1
Automated fixes for CI failures on #5075.
Applied
test-sanitizer-address(run)Fix details are posted as comments on this PR.
Generated by valkey-ci-agent using Claude Code.