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

Don't let left nodes hold onto their node-id #7747

Merged
merged 2 commits into from
May 4, 2020
Merged

Conversation

hanshasselberg
Copy link
Member

@hanshasselberg hanshasselberg commented Apr 30, 2020

Needs hashicorp/memberlist#223 and hashicorp/serf#601.

Fixes #7396.

This PR makes the merge handler skip nodes that properly left the cluster already and it will not complain about conflicting node ids. That could happen eg during a node rename. One of the problems that might arise because of this is that you are running into a conflict when renaming a node.

Afterwards consul members looks like this:

Node  Address          Status  Type    Build     Protocol  DC   Segment
s1    127.0.0.1:8301   alive   server  1.7.0dev  2         dc1  <all>
s2    127.0.0.1:10008  alive   server  1.7.0dev  2         dc1  <all>
s3    127.0.0.1:10015  alive   server  1.7.0dev  2         dc1  <all>
c1    127.0.0.1:10026  failed  client  1.7.0dev  2         dc1  <default>
c2    127.0.0.1:10033  alive   client  1.7.0dev  2         dc1  <default>
c3    127.0.0.1:10040  alive   client  1.7.0dev  2         dc1  <default>
c4    127.0.0.1:10045  alive   client  1.7.0dev  2         dc1  <default>
c5    127.0.0.1:10049  alive   client  1.7.0dev  2         dc1  <default>
cX    127.0.0.1:10026  alive   client  1.7.0dev  2         dc1  <default>

@hanshasselberg hanshasselberg changed the title skip left nodes skip left nodes in merge handler Apr 30, 2020
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although this will need serf/memberlist module updates too. But those others need merging/releasing first. Going to go ahead and approve assuming you are doing those other things.

@hanshasselberg hanshasselberg changed the title skip left nodes in merge handler Don't let left nodes hold onto their node-id May 4, 2020
@aglover-zendesk
Copy link

for posterity, I believe this addresses #4879 as well

@hanshasselberg
Copy link
Member Author

@aglover-zendesk I think so too! Good catch!

@ryanmt
Copy link

ryanmt commented Apr 7, 2021

Is there any technical reason why this fix wasn't pulled into 1.6.x releases? I don't see the change in v1.6.10, although it appears to have been pulled into the 1.5 releases.

We've run into this issue on a cluster running 1.6.6 and would love to be able to upgrade to a 1.6 release while we plan to adopt 1.7.

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.

unable to join consul 1.7.x cluster due to other members having conflicting node id's
4 participants