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

Change member join reconcile step to process joining itself, to handl… #3450

Merged
merged 3 commits into from
Sep 6, 2017

Conversation

preetapan
Copy link
Contributor

…e node IP address changes correctly when number of servers < 3

…e node IP address changes correctly when number of servers < 3
@preetapan preetapan requested a review from slackpad September 6, 2017 19:09
@@ -626,8 +626,8 @@ func (s *Server) handleDeregisterMember(reason string, member serf.Member) error

// joinConsulServer is used to try to join another consul server
func (s *Server) joinConsulServer(m serf.Member, parts *metadata.Server) error {
// Do not join ourself
if m.Name == s.config.NodeName {
// Do not join ourself if we are the only member
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I removed this check entirely, TestAgent_CheckAdvertiseAddrsSettings failed. Seems like it was trying to join the same node id with a different IP address, and if this check went away entirely it would keep removing and adding itself and never finishing leader election.

@slackpad
Copy link
Contributor

slackpad commented Sep 6, 2017

This fixes an issue found testing #1580.

Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

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

LGTM

@preetapan preetapan merged commit 65299e9 into master Sep 6, 2017
@preetapan preetapan deleted the raft_peers_fix branch September 6, 2017 20:17
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.

2 participants