Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Expected behavior
Network driver response are going to be written to KV storage and assigned to container sandbox
E.g. MacAddress from driver.CreateEndpoint should be assigned to container interface
Actual behavior
Network driver response are going to be lost, because n.getController().updateToStore(ep) performed before driver call CreateEndpoint.
e.g. MacAddress lost
Steps to reproduce the behavior
Use driver with CreateEndpoint response like this:
Jun 22 09:52:10 host libnetwork-plugin[23217]: time="2018-06-22T09:52:10Z" level=info msg="CreateEndpoint response" JSON="{"Interface":{"Address":"","AddressIPv6":"","MacAddress":"EE:EE:EE:EE:EE:EE"}}"
Look at MacAddress with 'docker inspect <continer_id>
Look at MacAddress inside container 'ip a' etc.
I had debugging code flow. At (daemon *Daemon) connectToNetwork
method I always have incomplete data (no driver response included). Endpoint.Info() has priority on return data from KV storage, but data in storage is incomplete.
This result in container creation with broken network config.
Can see this bug only at docker-ce, seems because of this commit (missing at moby):
docker-archive/docker-ce@eeeede3
Output of docker version
:
docker version
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:14:54 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:18:36 2018
OS/Arch: linux/amd64
Experimental: false
Output of docker info
:
docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 2
Server Version: 18.05.0-ce
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge calico host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.13-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 14.68GiB
Name: host_here
ID: GUWI:3FBN:FM7T:35QK:FJJJ:VM7E:CJMD:EV5L:KDIU:W22T:DMXJ:KTZL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 39
Goroutines: 66
System Time: 2018-06-22T09:58:24.492505617Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Cluster Store: etcd://<host_here>:2379
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.)