mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(join_command): use RaftURL as peer address
This commit is contained in:
parent
0c95e1eabb
commit
e0fbe27c99
@ -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())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user