-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
I'm trying to patch watchtower to handle multiple networks on container update ( My attempt ).
Once I had a "working" environment, the watchtower initiated the update of the image and then tried to launch a new container.
Steps to reproduce the issue:
- Create a container connected to more than 1 network based on an image from the hub you have write access to.
- Update the image on the hub
- Launch tuxago/watchtower:net-bug container and check the logs
Describe the results you received:
watchtower_1 | time="2016-12-09T00:09:42Z" level=info msg="Stopping /projectweb_newimg_1 (e5821371721d080695b31c74694db15c2a200e1f0c35d92c6a6af7ebe052217f) with SIGTERM"
watchtower_1 | time="2016-12-09T00:09:43Z" level=debug msg="Removing container e5821371721d080695b31c74694db15c2a200e1f0c35d92c6a6af7ebe052217f"
watchtower_1 | time="2016-12-09T00:09:43Z" level=info msg="Starting /projectweb_newimg_1"
watchtower_1 | time="2016-12-09T00:09:43Z" level=error msg="Error response from daemon: Container cannot be connected to network endpoints: projectweb_back, gate_front-tier"
watchtower_1 | time="2016-12-09T00:14:43Z" level=info msg="Checking containers for updated images"
Describe the results you expected: I shouldn't have any errors, and the new version of the container should be connected to both networks
Additional information you deem important (e.g. issue happens only occasionally):
It seems the message comes from https://github.com/docker/docker/blob/master/daemon/create.go#L293 , but before that, the code seems to indicate that it doesn't handle multiple network connections at all.
But it puzzles me, because launching a docker-compose with containers on multiple networks works. But maybe it doesn't use the same code path.
Output of docker version:
Version: 1.13.0-rc3
API version: 1.25
Go version: go1.7.3
Git commit: 4d92237
Built: Mon Dec 5 19:05:57 2016
OS/Arch: linux/amd64
Server:
Version: 1.13.0-rc3
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 4d92237
Built: Mon Dec 5 19:05:57 2016
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 19
Running: 9
Paused: 0
Stopped: 10
Images: 244
Server Version: 1.13.0-rc3
Storage Driver: overlay
Backing Filesystem: extfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-38-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.662 GiB
Name: moondark
ID: X74M:MJKW:QVHL:Z5LC:O75P:HHZG:OY7T:CIC5:XHET:HBSJ:S7E3:FQGL
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: dolanor
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.): on my xps13 laptop