Skip to content

Etcd can't be used a datastore on multihost #392

@tomdee

Description

@tomdee

I'm unable to use etcd as a backend datastore. This is a long standing issue - AFAIK, libnetwork/libkv has never worked with etcd.

$ docker version
Client:
 Version:      1.8.0-dev
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   2fe51ec
 Built:        Wed Jul  8 01:33:10 UTC 2015
 OS/Arch:      linux/amd64
 Experimental: true

Server:
 Version:      1.8.0-dev
 API version:  1.20
 Go version:   go1.4.2
 Git commit:   2fe51ec
 Built:        Wed Jul  8 01:33:10 UTC 2015
 OS/Arch:      linux/amd64
 Experimental: true

Docker output

$ sudo docker --kv-store=etcd:127.0.0.1:4001 -Dd
WARN[0000] Running experimental build                   
DEBU[0000] Registering DELETE, /containers/{name:.*}    
DEBU[0000] Registering DELETE, /images/{name:.*}        
DEBU[0000] Registering OPTIONS,                         
DEBU[0000] Registering GET, /containers/{name:.*}/stats 
DEBU[0000] Registering GET, /info                       
DEBU[0000] Registering GET, /images/json                
DEBU[0000] Registering GET, /images/search              
DEBU[0000] Registering GET, /images/get                 
DEBU[0000] Registering GET, /images/{name:.*}/history   
DEBU[0000] Registering GET, /containers/{name:.*}/export 
DEBU[0000] Registering GET, /events                     
DEBU[0000] Registering GET, /images/{name:.*}/json      
DEBU[0000] Registering GET, /containers/{name:.*}/json  
DEBU[0000] Registering GET, /containers/{name:.*}/logs  
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws 
DEBU[0000] Registering GET, /exec/{id:.*}/json          
DEBU[0000] Registering GET, /_ping                      
DEBU[0000] Registering GET, /containers/ps              
DEBU[0000] Registering GET, /version                    
DEBU[0000] Registering GET, /images/{name:.*}/get       
DEBU[0000] Registering GET, /containers/json            
DEBU[0000] Registering GET, /containers/{name:.*}/changes 
DEBU[0000] Registering GET, /containers/{name:.*}/top   
DEBU[0000] Registering POST, /images/load               
DEBU[0000] Registering POST, /images/{name:.*}/tag      
DEBU[0000] Registering POST, /containers/{name:.*}/unpause 
DEBU[0000] Registering POST, /containers/{name:.*}/start 
DEBU[0000] Registering POST, /containers/{name:.*}/stop 
DEBU[0000] Registering POST, /containers/{name:.*}/exec 
DEBU[0000] Registering POST, /containers/{name:.*}/rename 
DEBU[0000] Registering POST, /images/create             
DEBU[0000] Registering POST, /containers/create         
DEBU[0000] Registering POST, /containers/{name:.*}/kill 
DEBU[0000] Registering POST, /containers/{name:.*}/copy 
DEBU[0000] Registering POST, /auth                      
DEBU[0000] Registering POST, /build                     
DEBU[0000] Registering POST, /containers/{name:.*}/pause 
DEBU[0000] Registering POST, /containers/{name:.*}/restart 
DEBU[0000] Registering POST, /containers/{name:.*}/wait 
DEBU[0000] Registering POST, /containers/{name:.*}/attach 
DEBU[0000] Registering POST, /commit                    
DEBU[0000] Registering POST, /containers/{name:.*}/resize 
DEBU[0000] Registering POST, /exec/{name:.*}/start      
DEBU[0000] Registering POST, /exec/{name:.*}/resize     
DEBU[0000] Registering POST, /images/{name:.*}/push     
DEBU[0000] docker group found. gid: 131                 
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) 
INFO[0000] [graphdriver] using prior storage driver "aufs" 
DEBU[0000] Using graph driver aufs                      
DEBU[0000] Using default logging driver json-file       
DEBU[0000] Migrating existing containers                
DEBU[0000] Creating images graph                        
DEBU[0000] Restored 89 elements                         
DEBU[0000] Reloaded graph with 3 grants expiring at 2017-03-22 19:04:46.713978458 +0000 UTC 
DEBU[0000] Creating repository list                     
INFO[0000] Option DefaultDriver: bridge                 
INFO[0000] Option DefaultNetwork: bridge                
INFO[0000] Option OptionKVProvider: etcd                
INFO[0000] Option OptionKVProviderURL: 127.0.0.1:4001   
INFO[0000] Firewalld running: false                     
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING] 
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT]    
DEBU[0000] /sbin/iptables, [--wait -t nat -F DOCKER]    
DEBU[0000] /sbin/iptables, [--wait -t nat -X DOCKER]    
FATA[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]

etcd was started with

~/etcd-v2.0.11-linux-amd64$ ./etcd
2015/07/13 11:07:46 etcd: no data-dir provided, using default data-dir ./default.etcd
2015/07/13 11:07:46 etcd: listening for peers on http://localhost:2380
2015/07/13 11:07:46 etcd: listening for peers on http://localhost:7001
2015/07/13 11:07:46 etcd: listening for client requests on http://localhost:2379
2015/07/13 11:07:46 etcd: listening for client requests on http://localhost:4001
2015/07/13 11:07:46 etcdserver: datadir is valid for the 2.0.1 format
2015/07/13 11:07:46 etcdserver: name = default
2015/07/13 11:07:46 etcdserver: data dir = default.etcd
2015/07/13 11:07:46 etcdserver: member dir = default.etcd/member
2015/07/13 11:07:46 etcdserver: heartbeat = 100ms
2015/07/13 11:07:46 etcdserver: election = 1000ms
2015/07/13 11:07:46 etcdserver: snapshot count = 10000
2015/07/13 11:07:46 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
2015/07/13 11:07:46 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001
2015/07/13 11:07:46 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001
2015/07/13 11:07:46 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae
2015/07/13 11:07:46 raft: ce2a822cea30bfca became follower at term 0
2015/07/13 11:07:46 raft: newRaft ce2a822cea30bfca [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
2015/07/13 11:07:46 raft: ce2a822cea30bfca became follower at term 1
2015/07/13 11:07:46 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
2015/07/13 11:07:47 raft: ce2a822cea30bfca is starting a new election at term 1
2015/07/13 11:07:47 raft: ce2a822cea30bfca became candidate at term 2
2015/07/13 11:07:47 raft: ce2a822cea30bfca received vote from ce2a822cea30bfca at term 2
2015/07/13 11:07:47 raft: ce2a822cea30bfca became leader at term 2
2015/07/13 11:07:47 raft.node: ce2a822cea30bfca elected leader ce2a822cea30bfca at term 2
2015/07/13 11:07:47 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions