-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Member During Network Partition #63
Merged
Conversation
This file contains 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
JackyChiu
changed the title
Add Member During Network Parition
Add Member During Network Partition
Mar 23, 2020
JackyChiu
requested review from
bkzhang,
vikrambombhi and
dipshit
and removed request for
bkzhang
March 23, 2020 22:06
bkzhang
reviewed
Mar 23, 2020
bkzhang
reviewed
Mar 23, 2020
bkzhang
approved these changes
Mar 25, 2020
dipshit
approved these changes
Mar 25, 2020
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.
thanks for the detailed PR description & good test
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.
closes #54
What
This PR covers the research and features needed to add members during network partitions and how to do it safely. This is further proved in the tests.
How
The root problem comes from the fact that when
strict-reconfig-check
is enabled, all etcd nodes must be connected even though the cluster should only require quorum to do so. The reason is to avoid the edge case where a newly introduce node is misconfigured, where it can result in a loss of quorum since the new node counts as a voting node right away.This PR leaves the
strict-reconfig-check
up to the developers to disable themselves. However I did introduce a feature to reduce the risk when adding a new node.In v3.4 etcd introduced a learner feature. This is an intermediate state used where a node is added as a member but doesn't count as a voter. Once it caught up in the leader's logs, it can be promoted to a voter node. This is where the cluster checks if the node is healthy and configured to join, something that isn't done currently when added a new node.
In this PR we add new members as learners and auto-promote them when they are caught up. The auto promote had to be built by us since it's not available yet.
Review
Review by commit for an easier time.
tldr
strict-reconfig-check
to add node during network partition