Protect CHK recreate with live Raft quorum safety - #2070
Open
alex-zaitsev wants to merge 6 commits into
Open
Conversation
alex-zaitsev
force-pushed
the
fix/2069-chk-raft-quorum-safety
branch
from
August 22, 2026 10:42
4c78e49 to
44f3a37
Compare
Capturing shouldWaitHostReady before force-restart avoids Started-only after ReadyReplicas drops to 0, which let 3→1 downscale complete while the survivor was still 0/1. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace abort-on-quorum-refuse with a wait-then-defer flow, recovery-first host ordering, and a CHI-style single late disrupt gate with an early ensemble snapshot. Add test_020003_3 for interrupted Keeper rolls. Co-authored-by: Cursor <cursoragent@cursor.com>
Use atomic.Int32 for the ready-count stub shared between the wait loop and the goroutine that simulates a peer recovering. Co-authored-by: Cursor <cursoragent@cursor.com>
alex-zaitsev
force-pushed
the
fix/2069-chk-raft-quorum-safety
branch
from
August 22, 2026 17:00
7a1fa9c to
41cae72
Compare
Move ensemble policy into worker-raft-safety, collapse the disrupt gate behind ensureQuorumSafeToDisruptHost, and requeue ErrCRUDDeferred after 5s instead of error backoff so Raft headroom waits stay intentional. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2069 (CHK Raft quorum safety during rolls) and #2035 (drop pointless same-size settle delay). Partial #2059 (propagate reconcile status persist errors).
Quorum-safe Keeper rolls (#2069)
On a multi-node CHK, the operator must not take a Ready replica down if that would leave the ensemble below Raft majority, and must not keep rolling the next replica while a previous one never rejoined.
Behavior:
ReadyReplicas→0) cannot flip the pass into bootstrap mid-flight.[RaftQuorumUnsafe]), continue other replicas, then soft-requeue in 5s (not error backoff).Out of scope here: committed Raft membership /
mntrbarriers (#2041 — hook only), staged rescale (e.g. 3→2→1), and replacing blind downscale sleeps with per-step settle.Settle delay and status (#2035 / partial #2059)
Completedis persisted.vs CHI shard safety (#1704)
Test plan
go test ./pkg/controller/chk/test_020005xfail removedtest_020003/test_020005(keeper upgrade / scale)test_020003_3— 3-node CHK, broken-image roll stops on one replica, peers stay Ready through operator restart, recovery to good image (CHItest_010083analogue)Follow-ups