From e0fbe27c99f24e6f02e9e7e347ee51f5b76d2e7a Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Fri, 18 Apr 2014 10:28:24 -0700 Subject: [PATCH] fix(join_command): use RaftURL as peer address --- server/join_command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/join_command.go b/server/join_command.go index cfbd330a9..4bd1b2148 100644 --- a/server/join_command.go +++ b/server/join_command.go @@ -66,7 +66,7 @@ func (c *JoinCommandV1) Apply(context raft.Context) (interface{}, error) { // Check if the join command adds an instance that collides with existing one on peer URL. peerURLs := ps.registry.PeerURLs(ps.raftServer.Leader(), c.Name) for _, peerURL := range peerURLs { - if peerURL == c.EtcdURL { + if peerURL == c.RaftURL { log.Warnf("%v tries to join the cluster with existing URL %v", c.Name, c.EtcdURL) return []byte{0}, etcdErr.NewError(etcdErr.EcodeExistingPeerAddr, c.EtcdURL, context.CommitIndex()) }