-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: support new switchover action #1338
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1338 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 69 69
Lines 6685 6700 +15
=====================================
- Misses 6685 6700 +15 ☔ View full report in Codecov by Sentry. |
/tools/syncerctl switchover --primary "$KB_LEADER_POD_NAME" ${KB_SWITCHOVER_CANDIDATE_NAME:+--candidate "$KB_SWITCHOVER_CANDIDATE_NAME"} | ||
if [ -z "$KB_SWITCHOVER_ROLE" ]; then | ||
echo "role can't be empty" | ||
exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KB_SWITCHOVER_ROLE might be empty by design, but a non-zero exit indicates that the switchover action execution failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in most cases we can rely on kb's role info. Engines who need more precise role info can later change to a way that gets role info directly from kernel.
ref: apecloud/kubeblocks#8645