test(chk): deterministic split-brain red test for CHK scale-up - #2054
Draft
filimonov wants to merge 1 commit into
Draft
test(chk): deterministic split-brain red test for CHK scale-up#2054filimonov wants to merge 1 commit into
filimonov wants to merge 1 commit into
Conversation
Add test_020005_2: partition the sole existing keeper (pod0) from pod-to-pod
traffic, then request scale 1->3. A fire-and-forget operator brings both fresh
pods up at once; they form a 2-of-3 majority and elect a leader without pod0 --
split-brain. A safe operator stages members one at a time behind a committed-
membership barrier, so with pod0 unreachable pod2 is never created and the lone
pod1 cannot elect. Invariant: while pod0 is partitioned no leader may emerge
among the fresh nodes {1,2} -- RED on the pre-fix operator, GREEN on the fixed.
Partitioning is done at the node level via 'docker exec minikube iptables'
(no pod NET_ADMIN, no in-image iptables), so it runs on the GitHub Actions
minikube (driver: docker). A read-back 'partition is real' check from pod1
fails the test loudly rather than yielding a false green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Deterministic split-brain test for CHK Raft scale-up
Adds
test_020005_2— an e2e test that deterministically reproduces the Raft split-brain window duringClickHouseKeeperInstallationscale-up. Companion to #2041 (the fix): RED on the current release branch, GREEN with #2041 applied.Why: the existing happy-path scale-up test passes even on the pre-fix operator — the split-brain window self-heals within the assertion's retry budget, so it can't catch the bug. This test forces the window open and makes it observable.
How: partition the sole existing member (pod0) from all pod-to-pod traffic, then request scale 1→3. A fire-and-forget operator brings both fresh pods up at once; they form their own 2-of-3 majority and elect a leader without pod0 — split-brain. A safe operator stages members one at a time behind a committed-membership barrier, so with pod0 unreachable pod2 is never created and the lone pod1 can never elect. Invariant asserted: while pod0 is partitioned, no leader may emerge among the fresh nodes {1,2}.
Verified locally:
pod2 became leader among the fresh nodes while pod0 was partitioned)CI: partitioning is done at the node level via
docker exec minikube iptables(+ conntrack flush) — no podNET_ADMIN, no in-image iptables — so it runs on the GitHub Actions minikube (driver: docker). A read-back "partition is real" check fails loudly rather than yielding a false green.Draft / demonstration: this branch is based on
0.27.2and carries only the test (no operator fix), so its CI is expected to be RED on this base — that red is the point. Merging #2041 turns it green.