It seems that the issue is that the route to the docker network namespace does 
not exist after the OS starts up, so this rule is missing on my desktop:
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0

Because this is missing packages that would target the container go
instead of the NS network to the default gateway.

The problem might be that docker first tries to add the bridge and then the 
route.
When docker first starts it creates the docker0 interface and this does not get 
deleted when you stop and start or restart docker.
But if you stop docker and explicitly remove the interface and the bridge you 
will see that the route is not added on startup.

To reproduce.
1.) Restart machine.
2.) After the OS restart docker network is not working (route is missing).
3.) Restart docker service.
4.) Docker network is working again.
5.) Stop docker service
6.) Run:  ip link set docker0 down; brctl delbr docker0; brctl show; ip link 
show
7.) Start docker.
8.) After docker start docker network is not working (route is missing).
9.) Restart docker.
10.) Route gets added and everything is fine.

This is what I have been able to figure out so far.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1509867

Title:
  docker network connection only working after daemon restart

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1509867/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to