{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libnetwork/issues/392","labels_url":"https://api.github.com/repos/docker/libnetwork/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/392/comments","events_url":"https://api.github.com/repos/docker/libnetwork/issues/392/events","html_url":"https://github.com/docker/libnetwork/issues/392","id":94777928,"number":392,"title":"Etcd can't be used a datastore on multihost","user":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/libnetwork/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-07-13T18:09:29Z","updated_at":"2015-09-25T08:40:44Z","closed_at":null,"body":"I'm unable to use etcd as a backend datastore. This is a long standing issue - AFAIK, libnetwork/libkv has never worked with etcd.\r\n```\r\n$ docker version\r\nClient:\r\n Version:      1.8.0-dev\r\n API version:  1.20\r\n Go version:   go1.4.2\r\n Git commit:   2fe51ec\r\n Built:        Wed Jul  8 01:33:10 UTC 2015\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n\r\nServer:\r\n Version:      1.8.0-dev\r\n API version:  1.20\r\n Go version:   go1.4.2\r\n Git commit:   2fe51ec\r\n Built:        Wed Jul  8 01:33:10 UTC 2015\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\nDocker output\r\n```\r\n$ sudo docker --kv-store=etcd:127.0.0.1:4001 -Dd\r\nWARN[0000] Running experimental build                   \r\nDEBU[0000] Registering DELETE, /containers/{name:.*}    \r\nDEBU[0000] Registering DELETE, /images/{name:.*}        \r\nDEBU[0000] Registering OPTIONS,                         \r\nDEBU[0000] Registering GET, /containers/{name:.*}/stats \r\nDEBU[0000] Registering GET, /info                       \r\nDEBU[0000] Registering GET, /images/json                \r\nDEBU[0000] Registering GET, /images/search              \r\nDEBU[0000] Registering GET, /images/get                 \r\nDEBU[0000] Registering GET, /images/{name:.*}/history   \r\nDEBU[0000] Registering GET, /containers/{name:.*}/export \r\nDEBU[0000] Registering GET, /events                     \r\nDEBU[0000] Registering GET, /images/{name:.*}/json      \r\nDEBU[0000] Registering GET, /containers/{name:.*}/json  \r\nDEBU[0000] Registering GET, /containers/{name:.*}/logs  \r\nDEBU[0000] Registering GET, /containers/{name:.*}/attach/ws \r\nDEBU[0000] Registering GET, /exec/{id:.*}/json          \r\nDEBU[0000] Registering GET, /_ping                      \r\nDEBU[0000] Registering GET, /containers/ps              \r\nDEBU[0000] Registering GET, /version                    \r\nDEBU[0000] Registering GET, /images/{name:.*}/get       \r\nDEBU[0000] Registering GET, /containers/json            \r\nDEBU[0000] Registering GET, /containers/{name:.*}/changes \r\nDEBU[0000] Registering GET, /containers/{name:.*}/top   \r\nDEBU[0000] Registering POST, /images/load               \r\nDEBU[0000] Registering POST, /images/{name:.*}/tag      \r\nDEBU[0000] Registering POST, /containers/{name:.*}/unpause \r\nDEBU[0000] Registering POST, /containers/{name:.*}/start \r\nDEBU[0000] Registering POST, /containers/{name:.*}/stop \r\nDEBU[0000] Registering POST, /containers/{name:.*}/exec \r\nDEBU[0000] Registering POST, /containers/{name:.*}/rename \r\nDEBU[0000] Registering POST, /images/create             \r\nDEBU[0000] Registering POST, /containers/create         \r\nDEBU[0000] Registering POST, /containers/{name:.*}/kill \r\nDEBU[0000] Registering POST, /containers/{name:.*}/copy \r\nDEBU[0000] Registering POST, /auth                      \r\nDEBU[0000] Registering POST, /build                     \r\nDEBU[0000] Registering POST, /containers/{name:.*}/pause \r\nDEBU[0000] Registering POST, /containers/{name:.*}/restart \r\nDEBU[0000] Registering POST, /containers/{name:.*}/wait \r\nDEBU[0000] Registering POST, /containers/{name:.*}/attach \r\nDEBU[0000] Registering POST, /commit                    \r\nDEBU[0000] Registering POST, /containers/{name:.*}/resize \r\nDEBU[0000] Registering POST, /exec/{name:.*}/start      \r\nDEBU[0000] Registering POST, /exec/{name:.*}/resize     \r\nDEBU[0000] Registering POST, /images/{name:.*}/push     \r\nDEBU[0000] docker group found. gid: 131                 \r\nINFO[0000] Listening for HTTP on unix (/var/run/docker.sock) \r\nINFO[0000] [graphdriver] using prior storage driver \"aufs\" \r\nDEBU[0000] Using graph driver aufs                      \r\nDEBU[0000] Using default logging driver json-file       \r\nDEBU[0000] Migrating existing containers                \r\nDEBU[0000] Creating images graph                        \r\nDEBU[0000] Restored 89 elements                         \r\nDEBU[0000] Reloaded graph with 3 grants expiring at 2017-03-22 19:04:46.713978458 +0000 UTC \r\nDEBU[0000] Creating repository list                     \r\nINFO[0000] Option DefaultDriver: bridge                 \r\nINFO[0000] Option DefaultNetwork: bridge                \r\nINFO[0000] Option OptionKVProvider: etcd                \r\nINFO[0000] Option OptionKVProviderURL: 127.0.0.1:4001   \r\nINFO[0000] Firewalld running: false                     \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING] \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT]    \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -F DOCKER]    \r\nDEBU[0000] /sbin/iptables, [--wait -t nat -X DOCKER]    \r\nFATA[0000] Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to initialize vxlan id manager: failed to initialize bit sequence handler: 100: Key not found (/docker) [2]\r\n```\r\n\r\netcd was started with\r\n```\r\n~/etcd-v2.0.11-linux-amd64$ ./etcd\r\n2015/07/13 11:07:46 etcd: no data-dir provided, using default data-dir ./default.etcd\r\n2015/07/13 11:07:46 etcd: listening for peers on http://localhost:2380\r\n2015/07/13 11:07:46 etcd: listening for peers on http://localhost:7001\r\n2015/07/13 11:07:46 etcd: listening for client requests on http://localhost:2379\r\n2015/07/13 11:07:46 etcd: listening for client requests on http://localhost:4001\r\n2015/07/13 11:07:46 etcdserver: datadir is valid for the 2.0.1 format\r\n2015/07/13 11:07:46 etcdserver: name = default\r\n2015/07/13 11:07:46 etcdserver: data dir = default.etcd\r\n2015/07/13 11:07:46 etcdserver: member dir = default.etcd/member\r\n2015/07/13 11:07:46 etcdserver: heartbeat = 100ms\r\n2015/07/13 11:07:46 etcdserver: election = 1000ms\r\n2015/07/13 11:07:46 etcdserver: snapshot count = 10000\r\n2015/07/13 11:07:46 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001\r\n2015/07/13 11:07:46 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001\r\n2015/07/13 11:07:46 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001\r\n2015/07/13 11:07:46 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae\r\n2015/07/13 11:07:46 raft: ce2a822cea30bfca became follower at term 0\r\n2015/07/13 11:07:46 raft: newRaft ce2a822cea30bfca [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]\r\n2015/07/13 11:07:46 raft: ce2a822cea30bfca became follower at term 1\r\n2015/07/13 11:07:46 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae\r\n2015/07/13 11:07:47 raft: ce2a822cea30bfca is starting a new election at term 1\r\n2015/07/13 11:07:47 raft: ce2a822cea30bfca became candidate at term 2\r\n2015/07/13 11:07:47 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 2\r\n2015/07/13 11:07:47 raft: ce2a822cea30bfca became leader at term 2\r\n2015/07/13 11:07:47 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 2\r\n2015/07/13 11:07:47 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/libnetwork/issues/comments/143161791","html_url":"https://github.com/docker/libnetwork/issues/392#issuecomment-143161791","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/392","id":143161791,"user":{"login":"chenchun","id":985861,"avatar_url":"https://avatars.githubusercontent.com/u/985861?v=3","gravatar_id":"","url":"https://api.github.com/users/chenchun","html_url":"https://github.com/chenchun","followers_url":"https://api.github.com/users/chenchun/followers","following_url":"https://api.github.com/users/chenchun/following{/other_user}","gists_url":"https://api.github.com/users/chenchun/gists{/gist_id}","starred_url":"https://api.github.com/users/chenchun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenchun/subscriptions","organizations_url":"https://api.github.com/users/chenchun/orgs","repos_url":"https://api.github.com/users/chenchun/repos","events_url":"https://api.github.com/users/chenchun/events{/privacy}","received_events_url":"https://api.github.com/users/chenchun/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T08:40:44Z","updated_at":"2015-09-25T08:40:44Z","body":"@springi99 You can give it a try and make a PR if that works. "}}