Repository navigation
[CI] CI fix sweep for 9.0 - #5701
valkeyrie-ops[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Pushed ff25a03 with a fix for R 8 lost its second election because it asked for votes while two of its cluster bus links were still down after the packet drop filter was lifted. The test now holds R 8 back with cluster-replica-no-failover until its links with all five voters are connected in both directions, then releases it. The failing test passed 29 loops with the fix, and the bot's review approved it. Diagnosis and checksWhat failed: Primaries will not time out then they are elected in the same epoch in tests/unit/cluster/failover2.tcl (No failover detected on R 8) Root cause: While R 8 drops every packet with CLOSE-CLUSTER-LINK-ON-PACKET-DROP on, each dropped packet closes its link. R 8 closed all six outbound links at 09:29:53.720, and the filter was lifted at 53.868. R 8 saw R 7's claim of epoch 11 at 53.871, reset its election and started a new one for epoch 12 at 54.426. clusterNodeCronHandleReconnect only retries a node with no inbound link after node_timeout/2/10, which is 750 ms with this test's 15000 ms node timeout, and 54.426 is 706 ms after the last attempt. Primaries 3 and 4 accepted a connection only at 54.527 and logged neither a grant nor a denial for epoch 12. The vote request is broadcast once, only over links that exist, so R 8 got 3 votes (primaries 5 and 6, and R 7) of the 4 it needed. It logged 'Failover attempt expired' at 09:30:24 and the test's 50 second wait ran out. The failure is flaky. The fix: The test assumed R 8's links were back by the time its new election started, which the server does not guarantee: the new election starts 500 to 1000 ms after the reset and a reconnect can take up to 750 ms plus a cron tick. The fix holds the moving part still instead of waiting longer. It sets cluster-replica-no-failover yes on R 8 just before lifting the filter, waits until R 8 and each voter (R 3 to R 7) report each other's linkstate as connected, then sets it back to no. Both directions matter because the request goes over the candidate's outbound link and the vote comes back over the voter's outbound link. The hold does not weaken the test: the election reset happens in packet processing regardless of the config, and if it did not happen R 8 would still sit in its epoch 11 election after release and fail both the role wait and the 'Failover attempt expired' check. The same linkstate wait is what the default branch uses for the same kind of race in the config epoch test of this file (from #3833). What the bot checked
The agent's own notesI did not build or run anything; the verification command is the only check. No merged upstream commit fixes this. In the diffs I was given, the default branch drives this test with DEBUG CLUSTER-FAILOVER-EPOCH and CLUSTER-FAILOVER-DELAY from #3833 and does not close R 8's links, so it does not have this race and does not need this fix; I could not read the default branch's current file directly. No other release branch PR touched this test, and open PR #4296 only moves run_solo tests to another CI job. Not established by the log: that the connections primaries 3 and 4 accepted at 54.527 came from R 8. I inferred it from R 8's cron tick times and from those two primaries logging nothing about epoch 12. Residual: a voter's linkstate is its own view, so it could in principle still read connected for a link R 8 closed just before the filter was lifted, if the voter handled the test's query before that close. I judged this negligible because the close reaches the voter first. Server behaviour a maintainer may want to look at separately: a vote request is sent once per election and only over links that are up, so an election that starts within the reconnect backoff after link loss can miss voters and then waits out the full failover timeout. #5498's CI decides whether the fix holds once this is merged, and the bot never merges. |
a662c9c to
15fe05f
Compare
dba8733 to
62978cd
Compare
While R 8 drops every packet with CLOSE-CLUSTER-LINK-ON-PACKET-DROP on, each dropped packet closes its link. R 8 closed all six outbound links at 09:29:53.720, and the filter was lifted at 53.868. R 8 saw R 7's claim of epoch 11 at 53.871, reset its election and started a new one for epoch 12 at 54.426. clusterNodeCronHandleReconnect only retries a node with no inbound link after node_timeout/2/10, which is 750 ms with this test's 15000 ms node timeout, and 54.426 is 706 ms after the last attempt. Primaries 3 and 4 accepted a connection only at 54.527 and logged neither a grant nor a denial for epoch 12. The vote request is broadcast once, only over links that exist, so R 8 got 3 votes (primaries 5 and 6, and R 7) of the 4 it needed. It logged 'Failover attempt expired' at 09:30:24 and the test's 50 second wait ran out. The test assumed R 8's links were back by the time its new election started, which the server does not guarantee: the new election starts 500 to 1000 ms after the reset and a reconnect can take up to 750 ms plus a cron tick. The fix holds the moving part still instead of waiting longer. It sets cluster-replica-no-failover yes on R 8 just before lifting the filter, waits until R 8 and each voter (R 3 to R 7) report each other's linkstate as connected, then sets it back to no. Both directions matter because the request goes over the candidate's outbound link and the vote comes back over the voter's outbound link. The hold does not weaken the test: the election reset happens in packet processing regardless of the config, and if it did not happen R 8 would still sit in its epoch 11 election after release and fail both the role wait and the 'Failover attempt expired' check. The same linkstate wait is what the default branch uses for the same kind of race in the config epoch test of this file (from #3833). CI-Fix-Job: test-ubuntu-tls-no-tls CI-Fix-Run: https://github.com/valkey-io/valkey/actions/runs/46616296383 Signed-off-by: valkeyrie-ops[bot] <284117741+valkeyrie-ops[bot]@users.noreply.github.com>
62978cd to
a9bd437
Compare
CI fix sweep for 9.0
Automated fixes for CI failures on #5498.
Applied
test-ubuntu-tls-no-tls(run)Fix details are posted as comments on this PR.
Generated by valkey-ci-agent using Claude Code.