[Bugfix] Implement upgrade-aware controller ordering for FE/BEs/CNs#704
Closed
jmjm15x wants to merge 1 commit intoStarRocks:mainfrom
Closed
[Bugfix] Implement upgrade-aware controller ordering for FE/BEs/CNs#704jmjm15x wants to merge 1 commit intoStarRocks:mainfrom
jmjm15x wants to merge 1 commit intoStarRocks:mainfrom
Conversation
|
jmjm15x seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
a8d04a0 to
a0a8087
Compare
Replace static subcontroller array with dynamic ordering based on cluster state: - Add isUpgrade() state machine detecting phase + image changes - Implement getControllersInOrder() for runtime controller sequence building - Switch FE-first (deploy) ↔ BE-first (upgrade) automatically - Add unit tests for upgrade detection logic and controller ordering verification - Include state transition logging for debugging Follows StarRocks upgrade procedures (BE→FE) while preserving safe deployments (FE→BE). Signed-off-by: jmjm15x <jmjm15x@gmail.com>
a0a8087 to
5c79201
Compare
Author
|
Found a race condition issue and addressed it with a better approach in PR #707. Closing this PR to avoid confusion. |
6 tasks
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.
Description
Add upgrade detection and implement BE-first ordering for cluster upgrades in the StarRocks Kubernetes Operator. Previously, the operator always used FE-first ordering, which is correct for initial deployments but incorrect for upgrades. According to StarRocks guidelines:
From official documentation:
Solution
Implemented an upgrade detection mechanism that dynamically switches controller execution order based on cluster state.
Key Changes
isUpgrade() function
getControllersInOrder() function
Logic Flow:
Test Case 1: Initial Deployment (v3.1.0)
Result: Correctly used FE-first ordering
Test Case 2: Upgrade (v3.1.0 → v3.1.8)
Result: Correctly detected upgrade and used BE-first ordering
Benefits
Verification
To verify the fix works in your environment:
Related Issue(s)
#238
Checklist
For operator, please complete the following checklist:
make generateto generate the code.golangci-lint runto check the code style.make testto run UT.make manifeststo update the yaml files of CRD.For helm chart, please complete the following checklist:
file of starrocks chart.
scriptsdirectory, runbash create-parent-chart-values.shto update the values.yaml file of the parentchart( kube-starrocks chart).