-
Notifications
You must be signed in to change notification settings - Fork 147
OCPBUGS-42810: actively move bootstrap member lead #1369
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
Open
tjungblu
wants to merge
6
commits into
openshift:main
Choose a base branch
from
tjungblu:OCPBUGS-42810_moveleader
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
356dd9c
OCPBUGS-42810: add move leader to CLI
tjungblu 0046a99
use the member instead of the id
tjungblu 95342ac
update status, add findleader function
tjungblu 43a24c5
fix naming
tjungblu a459851
OCPBUGS-42810: actively move bootstrap member lead
tjungblu 42628ec
TEST_ONLY force bootstrap member being the leader
tjungblu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
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.
This seems okay so not disagreeing here, but for my knowledge what is the potential negative impact of removing the member right after we transfer?
At first I thought we're waiting for the transfer to happen but as I found out below
MoveLeader()
seems to be synchronous.If we are indeed waiting for something to stabilize then just thinking if it's possible that may not happen by the next resync.
Or just so we get a chance to update the status first.
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.
great question: what are we waiting on here. My intuition was to avoid disrupting the API too much, the clients will get the LeaderChangedErr (
Error from server: etcdserver: leader changed
) on the move. Then potentially removing the member could also disrupt it further, e.g. during a static pod rollout.I know this is highly hypothetical...
Unfortunately, I do not have any data yet on whether this would be really necessary. It is just too damn hard to reproduce this case.
Let me quickly put together a controller that will always make the bootstrap node the leader during the bootstrapping phase.
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.
here's a run with this controller, you can grep the logs with TEST_ONLY
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-etcd-operator/1369/pull-ci-openshift-cluster-etcd-operator-main-e2e-azure/1967558360303669248
https://grafana-loki.ci.openshift.org/explore?orgId=1&left=%7B%22datasource%22:%22PCEB727DF2F34084E%22,%22queries%22:%5B%7B%22expr%22:%22%7Binvoker%3D%5C%22openshift-internal-ci%2Fpull-ci-openshift-cluster-etcd-operator-main-e2e-azure%2F1967558360303669248%5C%22%7D%20%7C~%20%5C%22TEST_ONLY%7Cremoved%20bootstrap%5C%22%22,%22refId%22:%22A%22,%22editorMode%22:%22code%22,%22queryType%22:%22range%22%7D%5D,%22range%22:%7B%22from%22:%221757931212276%22,%22to%22:%221757967212278%22%7D%7D
it also seems there was no actual move being done before removing, even though we have moved the leader to the bootstrap node a minute earlier.
it still kinda shows what I was worried about:
it seems that this is the case of scaling from 4->3, but during a static pod rollout, so that breaks quorum and causes raft to stop.
Anyway, I need a bit more time to test this, so I'll pick this up again when I have some time left with RIT :)