{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18091","labels_url":"https://api.github.com/repos/docker/docker/issues/18091/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18091/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18091/events","html_url":"https://github.com/docker/docker/issues/18091","id":117840729,"number":18091,"title":"container with unless-stopped restart policy is not restarted when the overlay network is not yet available","user":{"login":"sebi-hgdata","id":11443582,"avatar_url":"https://avatars.githubusercontent.com/u/11443582?v=3","gravatar_id":"","url":"https://api.github.com/users/sebi-hgdata","html_url":"https://github.com/sebi-hgdata","followers_url":"https://api.github.com/users/sebi-hgdata/followers","following_url":"https://api.github.com/users/sebi-hgdata/following{/other_user}","gists_url":"https://api.github.com/users/sebi-hgdata/gists{/gist_id}","starred_url":"https://api.github.com/users/sebi-hgdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebi-hgdata/subscriptions","organizations_url":"https://api.github.com/users/sebi-hgdata/orgs","repos_url":"https://api.github.com/users/sebi-hgdata/repos","events_url":"https://api.github.com/users/sebi-hgdata/events{/privacy}","received_events_url":"https://api.github.com/users/sebi-hgdata/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/networking","name":"group/networking","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-11-19T15:42:31Z","updated_at":"2015-11-25T01:03:01Z","closed_at":null,"body":"There seems to be an issue when restarting a container with unless-stopped and an overlay network. (see the inspect error ' \"Error\": \"network v7 not found\",' ) Here is my env and steps to reproduce: \r\n $ sudo docker info\r\nContainers: 24\r\nImages: 302\r\nServer Version: 1.9.0\r\nStorage Driver: overlay\r\n Backing Filesystem: extfs\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nKernel Version: 4.3.0-040300-generic\r\nOperating System: Ubuntu 14.04.3 LTS\r\nCPUs: 8\r\nTotal Memory: 15.16 GiB\r\nName: sebi\r\nID: G3MJ:2URQ:P7DQ:5Z4W:GAW4:RYKP:U23J:NPER:IFEQ:XLFB:QX77:H3VA\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nCluster store: consul://localhost:8500\r\nCluster advertise: 192.168.77.233:2375\r\n\r\n\r\n$ sudo docker version\r\nClient:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 17:43:42 UTC 2015\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.9.0\r\n API version:  1.21\r\n Go version:   go1.4.2\r\n Git commit:   76d6bc9\r\n Built:        Tue Nov  3 17:43:42 UTC 2015\r\n OS/Arch:      linux/amd64 \r\n\r\n$ uname -a\r\nLinux sebi 4.3.0-040300-generic #201511020949 SMP Mon Nov 2 14:50:44 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n$ sudo docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n1265e5a72ba8        swarm:1.0.0         \"/swarm manage --host\"   3 days ago          Up 34 minutes                           swarm-manager\r\n3e68afe02fce        swarm:1.0.0         \"/swarm join --addr=l\"   3 days ago          Up 34 minutes                           swarm-agent\r\nbdfb83da6312        48ea159bfe73        \"/bin/sh -c 'sudo dns\"   3 days ago          Up 34 minutes                           dnsmasq\r\n60f63d5d58be        195324010cf2        \"./start.sh\"             3 days ago          Up 34 minutes                           consul-server\r\n\r\n$ sudo docker network ls\r\nNETWORK ID          NAME                DRIVER\r\n1e8d37cfbdc6        v7                  overlay             \r\nd352bb53614d        es                  overlay             \r\n0df6681e5e8b        docker_gwbridge     bridge              \r\n9430df44358f        test                bridge              \r\nc7bc60c709f2        bridge              bridge              \r\n70adb2539cf5        none                null                \r\nf46bb02ef887        host                host \r\n\r\n$ sudo docker run -tid --restart=\"unless-stopped\" --net=\"v7\" ubuntu bash \r\n96108449ddd584567314878b09885014012e21d9107dd21da791a2fa1a4b2f19\r\n\r\n$ sudo docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n96108449ddd5        ubuntu              \"bash\"                   10 seconds ago      Up 10 seconds                           evil_noyce\r\n1265e5a72ba8        swarm:1.0.0         \"/swarm manage --host\"   3 days ago          Up 36 minutes                           swarm-manager\r\n3e68afe02fce        swarm:1.0.0         \"/swarm join --addr=l\"   3 days ago          Up 36 minutes                           swarm-agent\r\nbdfb83da6312        48ea159bfe73        \"/bin/sh -c 'sudo dns\"   3 days ago          Up 36 minutes                           dnsmasq\r\n60f63d5d58be        195324010cf2        \"./start.sh\"             3 days ago          Up 36 minutes                           consul-server\r\n\r\n$ ps -aef|grep docker\\ daemon\r\nadminis+  3623     1  1 17:01 ?        00:00:43 /usr/bin/docker daemon --userland-proxy=false --cluster-advertise=eth0:2375 --cluster-store consul://localhost:8500 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --bip=172.17.42.1/16 --dns 8.8.8.8 --dns 8.8.4.4 -s overlay\r\nseb      22117  3020  0 17:38 pts/26   00:00:00 grep --color=auto docker daemon\r\n\r\n$ sudo kill -9 3623\r\n\r\n$ sudo docker ps\r\nCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES\r\n1265e5a72ba8        swarm:1.0.0         \"/swarm manage --host\"   3 days ago          Up 8 seconds                            swarm-manager\r\n3e68afe02fce        swarm:1.0.0         \"/swarm join --addr=l\"   3 days ago          Up 8 seconds                            swarm-agent\r\nbdfb83da6312        48ea159bfe73        \"/bin/sh -c 'sudo dns\"   3 days ago          Up 8 seconds                            dnsmasq\r\n60f63d5d58be        195324010cf2        \"./start.sh\"             3 days ago          Up 8 seconds                            consul-server\r\n\r\n$ sudo docker network ls\r\nNETWORK ID          NAME                DRIVER\r\n1e8d37cfbdc6        v7                  overlay             \r\nd352bb53614d        es                  overlay             \r\nfcb31a4013e6        host                host                \r\n0df6681e5e8b        docker_gwbridge     bridge              \r\n9430df44358f        test                bridge              \r\neff2051a90e9        bridge              bridge              \r\nd08eb8a89060        none                null \r\n\r\n$ sudo docker inspect evil_noyce\r\n[\r\n{\r\n    \"Id\": \"96108449ddd584567314878b09885014012e21d9107dd21da791a2fa1a4b2f19\",\r\n    \"Created\": \"2015-11-19T15:37:40.251001258Z\",\r\n    \"Path\": \"bash\",\r\n    \"Args\": [],\r\n    \"State\": {\r\n        \"Status\": \"exited\",\r\n        \"Running\": false,\r\n        \"Paused\": false,\r\n        \"Restarting\": false,\r\n        \"OOMKilled\": false,\r\n        \"Dead\": false,\r\n        \"Pid\": 0,\r\n        \"ExitCode\": 137,\r\n        \"Error\": \"network v7 not found\",\r\n        \"StartedAt\": \"2015-11-19T15:37:40.799663568Z\",\r\n        \"FinishedAt\": \"2015-11-19T15:38:47.407391317Z\"\r\n    },\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/159452493","html_url":"https://github.com/docker/docker/issues/18091#issuecomment-159452493","issue_url":"https://api.github.com/repos/docker/docker/issues/18091","id":159452493,"user":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T01:03:01Z","updated_at":"2015-11-25T01:03:01Z","body":"@sebi-hgdata just to make sure we are talking about the same problem. The consul issue that I brought up is for the vxlan issue that @cpuguy83 brought up. The restart policy issue is something we have to solve "}}