Change member join reconcile step to process joining itself, to handle node IP address changes correctly when number of servers < 3

This commit is contained in:
Preetha Appan 2017-09-06 13:53:01 -05:00
parent 676a34efbd
commit 1eae9f1e2f
1 changed files with 2 additions and 2 deletions

View File

@ -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
if m.Name == s.config.NodeName && len(s.serfLAN.Members()) == 1 {
return nil
}