Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cjc7373
Copy link
Contributor

@cjc7373 cjc7373 commented Dec 18, 2024

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (e5490d5) to head (8e4d474).

Files with missing lines Patch % Lines
...dons/postgresql/scripts-ut-spec/switchover_spec.sh 0.00% 15 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@cjc7373 cjc7373 marked this pull request as ready for review December 23, 2024 08:23
/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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants