Re: adding a new member requires configuring all the peers

1,392 views
Skip to first unread message

Xiang Li

unread,
Mar 28, 2015, 1:13:55 PM3/28/15
to Jean-Lou Dupont, etcd...@googlegroups.com
I think this addition step closes the door to operational errors. It verifies the state you want the cluster to be and the actual cluster state. If they do not match, the new member will not start. 



On Sat, Mar 28, 2015 at 7:23 AM, Jean-Lou Dupont <jeanlou...@gmail.com> wrote:
For etcd v2.x , reading https://github.com/coreos/etcd/blob/master/Documentation/runtime-configuration.md#add-a-new-member 

Why can't the new member figure out the nodes of the cluster instead of having to manually configuring it ?  This additional step opens the door to operational errors.

--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Lou Dupont

unread,
Mar 28, 2015, 4:30:45 PM3/28/15
to etcd...@googlegroups.com, jeanlou...@gmail.com
I am sorry I was not precise enough:


{"members":[{"id":"9bfe2efc1383e28","name":"","peerURLs":["http://10.1.0.214:7001"],"clientURLs":[]},{"id":"45f756e4abbcae50","name":"etcd1","peerURLs":["http://10.1.0.214:2380"],"clientURLs":["http://10.1.0.214:2379"]},{"id":"9a1bc16594da9353","name":"etcd0","peerURLs":["http://10.1.0.214:5002"],"clientURLs":["http://10.1.0.214:5001"]}]}

You see, the new node is there but the parameter 'name' isn't configured.  So, when I tried to add 'etcd2' node to the cluster (with a docker container), I get " etcd: couldn't find local name "etcd2" in the initial cluster configuration" .

Yicheng Qin

unread,
Mar 30, 2015, 4:17:32 PM3/30/15
to Jean-Lou Dupont, etcd...@googlegroups.com
The error means that you need to set `--initial-cluster` flag correctly. `--initial-cluster` should contains the name that you give. The easy way is to use the env vars that `etcdctl member add` suggests to add.

Yicheng Qin

unread,
Mar 30, 2015, 4:19:23 PM3/30/15
to Jean-Lou Dupont, etcd...@googlegroups.com
For your case, command should include "--name etcd2 --initial-cluster etcd2=http://10.1.0.214:7001,etcd1=http://10.1.0.214:2380,etcd0=http://10.1.0.214:5002"
Reply all
Reply to author
Forward
0 new messages