fix(mysql): orc switchover fails closed when Orchestrator is unreachable#3078
Draft
weicao wants to merge 1 commit into
Draft
fix(mysql): orc switchover fails closed when Orchestrator is unreachable#3078weicao wants to merge 1 commit into
weicao wants to merge 1 commit into
Conversation
…achable Stop merging orchestrator-client stderr into command substitutions: error text was parsed as a master name / instance list, making the two skip-guards exit 0 and a failed switchover report success. Check the client exit code explicitly and exit non-zero on query failure; count instances from non-empty lines only; include the real exit code in the failure message. Fixes #3077 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3078 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 144 144
Lines 23013 23013
=====================================
Misses 23013 23013 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #3077.
Root-cause-only change in
orc-switchover.sh:which-cluster-master/which-cluster-instancesno longer capture stderr into the result; the client's exit code is checked explicitly and query failure exits 1 (kbagent retry drives convergence per the 05c contract).-le 1.Pre-flight guards (role check, not-the-master skip, single-instance skip, graceful-master-takeover-auto flow) are unchanged.
Validation:
bash -npass. Runtime validation (switchover with Orchestrator down must fail the Ops, switchover with Orchestrator up must succeed) to be run by the mysql addon team via kubeblocks-tests before undraft.🤖 Generated with Claude Code