fix(zookeeper): fail closed on uncertain role probe#3230
Draft
weicao wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3230 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 150 150
Lines 23606 23673 +67
=====================================
- Misses 23606 23673 +67 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
weicao
marked this pull request as draft
July 18, 2026 16:15
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.
Problem
ZooKeeper
roleProbecurrently exits successfully when it cannot obtain a trustworthy role. On the base commit, an emptyncresponse and a refused connection both returnedrc=0with empty output, whileMode: lookingreturnedrc=0and publishedlookingas a role.The probe output drives Pod role labels and routing. An unknown state must be rejected instead of being published as a role.
Change
nc/zkServer.shprobe pipelinesstandalone,leader,follower, andobserverstandalonetoleadermappingEvidence
The new tests against the old implementation produced 18 examples with 4 expected failures: empty output,
Mode: looking, connection refusal, and ambiguous multi-line output. The same tests pass after this change.Validation:
/bin/bash -c /kubeblocks/scripts/roleprobe.shc0bfd8f285e69be4bf7025e5411c85aacbc1536eReview focus
Please focus on the exact role whitelist and whether every uncertain probe path returns non-zero without publishing stdout.
Boundary
This PR validates the role-probe script contract and chart rendering. It does not rerun or change the existing ZooKeeper runtime repetition ledger, and it does not claim coverage of all controller routing timings.