weave: Containers attached to weave net do not restart after docker service restart
I am creating a container with restart
policy always
and attached to weave net. The container does not restart after docker engine restart. I think it is a bug.
Here is the reproducer:
#!/usr/bin/env bash
set -e
weave launch \
--ipalloc-range 10.32.0.0/13 --ipalloc-default-subnet 10.32.0.0/12 \
--name=::1 --ipalloc-init seed=::1,::2,::3,::4
docker run --name sleep-client -h sleep-client.weave.local -dti \
--init \
--net=weave --ip=10.40.1.11 \
$(weave dns-args) \
--restart always \
ubuntu:16.04 \
sleep 2000
docker ps
sleep 5
service docker restart
sleep 5
docker ps
Here is the output:
vagrant@clusterlite-build:~$ sudo /vagrant/reproducer.sh
ecc737bd9ee65077a98010a5730ff74d5c0af490804b687f71d85ee9386aca67
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecc737bd9ee6 ubuntu:16.04 "sleep 2000" Less than a second ago Up Less than a second sleep-client
afb03a4796d3 weaveworks/plugin:1.9.7 "/home/weave/plugin" 2 seconds ago Up 1 second weaveplugin
04ba203c726a weaveworks/weaveexec:1.9.7 "/home/weave/weave..." 2 seconds ago Up 2 seconds weaveproxy
d50b04b596fc weaveworks/weave:1.9.7 "/home/weave/weave..." 4 seconds ago Up 3 seconds weave
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
afb03a4796d3 weaveworks/plugin:1.9.7 "/home/weave/plugin" About a minute ago Up 20 seconds weaveplugin
04ba203c726a weaveworks/weaveexec:1.9.7 "/home/weave/weave..." About a minute ago Up 20 seconds weaveproxy
d50b04b596fc weaveworks/weave:1.9.7 "/home/weave/weave..." About a minute ago Up 20 seconds weave
What you expected to happen?
I expect sleep-client container to be in the list both times.
What happened?
It is in the list before docker restart and it is not in the list after docker restart.
How to reproduce it?
see the script above
Anything else we need to know?
environment: vagrant, virtualbox, ubuntu 16:04 weave 1.9.5 and 1.9.7 docker 1.13.1
Logs:
I will attach docker and weave service logs
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (9 by maintainers)
Thanks guys! Weave proxy alternative works.
@avkonst, no, we do not plan to replace the proxy with anything else, you will still have all of the below supported if you want to set up Weave Net:
weave launch
&eval $(weave env)
)weave launch
&docker run --net=weave $(weave dns-args)
)weave-kube
The Docker V2 plugin is just being added to ease integration with Docker Swarm. However, Docker may or may not improve the API for V1 plugins, so I cannot comment on this unfortunately, as I do not have visibility.