overlay network stops working after stack down/up cycles (possible race condition or locking issue)
@selansen is already working on this.
Since Feb 20, 2018.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
Following these steps you can reproduce the issues in a matter of minutes. All you need is to bring up a cluster of 2 nodes
create a manager node
docker-machine create --driver virtualbox manager
docker-machine ssh manager
add debug setting
echo '{ "debug": true }' > /etc/docker/daemon.json
get dockerd to reload the config
kill -HUP $(pidof dockerd)
check log for releasing of overlay network
tail -f /var/log/docker.log | grep 'releasing IPv4 pools'
start another terminal and do the steps above for a worker node
start another terminal init swarm manager
eval $(docker-machine env manager)
docker swarm init --advertise-addr 192.168.99.103
make the worker join the swarm
eval $(docker-machine env worker)
docker swarm join --token SWMTKN-1-2duh1guir5ywynuyz2p4w2 192.168.99.103:2377
you should now have a 2 node cluster
eval $(docker-machine env manager)
docker node ls
run this until the worker log inidicate it did not release the overlay network as it should
./up-and-down.sh
Monitor the nodes dockerd logs
tail -f /var/log/docker.log | grep 'releasing IPv4 pools'
You'll notice both nodes release the overlay network but sometimes (after a few cycles) the worker node does not release the overlay network and then your in a state where both nodes do not use the same overlay network id. At this point the services are unable to ping each other.
Files needed
up-and-down.sh script brings up and down the stack
ping.sh used to ping other service in the overlay network
Dockerfile create an image and put the ping.sh script into it
docker-stack.yml services to deploy to the swarm
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.