I'm having some trouble setting up etcd cluster without using a discovery URL running on CoreOS.
The configuration is via cloud-init.
The 3 servers in the cluster are listed under peers below. Each has a different IP and has addr and peer-addr set statically.
For example, the first server is contains:
#cloud-config
coreos:
etcd:
addr: 192.168.0.50:4001
peer-addr: 192.168.0.50:7001
peers: 192.168.0.50:7001,192.168.0.51:7001,192.168.0.52:7001
What I'm seeing in journalctl is:
WARNING | fail syncing cluster([http://192.168.0.50:7001
http://127.0.0.1:7001])
And errors like these:
locksmithd[12262]: etcd.service is active locksmithd[12262]: Error
initializing etcd client: 402: Standby Internal Error (
I assume because etcd isn't working correctly.
Unfortunately, the CoreOS website does not detail a static setup of CoreOS & etcd in practice.
Once that is working, what would my cloud-config look like for a proxied etcd instance?
Best Answer
When using static discovery, etcd 0.4.x selects the initial leader of the cluster as the node that was started without a
--peer
list. You'll need to omit thepeers:
section of one of your cloud-configs.etcd 2.0.0 will allow you to bootstrap the cluster in the way your attempting now, which is providing a static list to all members and bring the cluster up that way. Check out the static clustering docs: https://github.com/coreos/etcd/blob/master/Documentation/clustering.md#static
etcd 2.0.0 isn't shipping in a CoreOS image/channel, but look for it soon!