{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1365","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1365/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1365/events","html_url":"https://github.com/docker/swarmkit/issues/1365","id":170636779,"number":1365,"title":"`docker network inspect <network>` does not contains containers","user":{"login":"grimabe","id":1334148,"avatar_url":"https://avatars.githubusercontent.com/u/1334148?v=3","gravatar_id":"","url":"https://api.github.com/users/grimabe","html_url":"https://github.com/grimabe","followers_url":"https://api.github.com/users/grimabe/followers","following_url":"https://api.github.com/users/grimabe/following{/other_user}","gists_url":"https://api.github.com/users/grimabe/gists{/gist_id}","starred_url":"https://api.github.com/users/grimabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grimabe/subscriptions","organizations_url":"https://api.github.com/users/grimabe/orgs","repos_url":"https://api.github.com/users/grimabe/repos","events_url":"https://api.github.com/users/grimabe/events{/privacy}","received_events_url":"https://api.github.com/users/grimabe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarmkit/labels/area/networking","name":"area/networking","color":"fef2c0"},{"url":"https://api.github.com/repos/docker/swarmkit/labels/kind/question","name":"kind/question","color":"EBEFC9"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-11T12:43:56Z","updated_at":"2016-08-12T21:21:55Z","closed_at":"2016-08-12T21:21:55Z","body":"Hi I am having trouble listing the containers of a network. Here are my docker-engine info (on the manager) and after the steps to follow to reproduce.\r\n\r\n`docker version`\r\n````\r\nClient:\r\n Version:      1.12.0\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   8eab29e\r\n Built:        Thu Jul 28 22:00:36 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.12.0\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   8eab29e\r\n Built:        Thu Jul 28 22:00:36 2016\r\n OS/Arch:      linux/amd64\r\n````\r\n`docker info`\r\n````\r\nContainers: 0\r\n Running: 0\r\n Paused: 0\r\n Stopped: 0\r\nImages: 8\r\nServer Version: 1.12.0\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 66\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: overlay bridge host null\r\nSwarm: active\r\n NodeID: 1rd3z1fvgils8ta332bmosc53\r\n Is Manager: true\r\n ClusterID: 0krcc9l12q1fpqfysca80icwa\r\n Managers: 1\r\n Nodes: 3\r\n Orchestration:\r\n  Task History Retention Limit: 5\r\n Raft:\r\n  Snapshot interval: 10000\r\n  Heartbeat tick: 1\r\n  Election tick: 3\r\n Dispatcher:\r\n  Heartbeat period: 5 seconds\r\n CA configuration:\r\n  Expiry duration: 3 months\r\n Node Address: 172.0.29.122\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: apparmor\r\nKernel Version: 3.19.0-66-generic\r\nOperating System: Ubuntu 14.04.5 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 487.5 MiB\r\nName: sw-manager-0\r\nID: IMQS:2RE5:3VUU:XD5B:YHB2:7XHX:TWNL:S633:CLEZ:BWTL:2RUH:MXJ2\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n````\r\n\r\nFirst I created a manager and two nodes with the following steps\r\n\r\n````\r\ndocker swarm init --advertise-addr eth0\r\n````\r\n\r\nthen I executed this on both of my nodes\r\n\r\n````\r\ndocker swarm join \\\r\n    --token SWMTKN-1-18l5iyraef9z743ub9du0gs21vst94m9aza7utavscam8i4hqj-0nv5zvrnkvrdyxcxmwb2vkpvv \\\r\n    172.0.29.122:2377\r\n````\r\n\r\nwhen I do `docker node ls` on the manager I got the expected output\r\n````\r\nID                           HOSTNAME           STATUS  AVAILABILITY  MANAGER STATUS\r\n1rd3z1fvgils8ta332bmosc53 *  sw-manager-0       Ready   Active        Leader\r\n3y27h5s9c82zt028hytc9aslj    sw-node-web-0      Ready   Active        \r\nb6e139kamrvo89h3kqoz52vgn    sw-node-backend-0  Ready   Active   \r\n````\r\nI also created a test network\r\n\r\n````\r\ndocker network create -d overlay test_network\r\n````\r\nwhich has the id **4j5wtsm4za7gw40cdf0re43di**\r\n\r\nthen I create a first service : \r\n\r\n`docker service create --name whoami -p 80:8000 --network test_network jwilder/whoami`\r\n\r\nwhich has the id **3kv2zk8g0dmd0fyxyfxdw36sq**\r\n\r\nIn this case the container has been attached to one of the worker (not the manager)\r\n\r\nthen if run on the manager : `docker network inspect test_network`\r\nI got the following result: \r\n```\r\n[\r\n    {\r\n        \"Name\": \"test_network\",\r\n        \"Id\": \"4j5wtsm4za7gw40cdf0re43di\",\r\n        \"Scope\": \"swarm\",\r\n        \"Driver\": \"overlay\",\r\n        \"EnableIPv6\": false,\r\n        \"IPAM\": {\r\n            \"Driver\": \"default\",\r\n            \"Options\": null,\r\n            \"Config\": []\r\n        },\r\n        \"Internal\": false,\r\n        \"Containers\": null,\r\n        \"Options\": {\r\n            \"com.docker.network.driver.overlay.vxlanid_list\": \"257\"\r\n        },\r\n        \"Labels\": null\r\n    }\r\n]\r\n```\r\n\r\nIt is strange that the **containers** is empty\r\n\r\nIf i run the same command on the worker where the service is running i got the following \r\n\r\n````\r\n[\r\n    {\r\n        \"Name\": \"test_network\",\r\n        \"Id\": \"4j5wtsm4za7gw40cdf0re43di\",\r\n        \"Scope\": \"swarm\",\r\n        \"Driver\": \"overlay\",\r\n        \"EnableIPv6\": false,\r\n        \"IPAM\": {\r\n            \"Driver\": \"default\",\r\n            \"Options\": null,\r\n            \"Config\": [\r\n                {\r\n                    \"Subnet\": \"10.0.0.0/24\",\r\n                    \"Gateway\": \"10.0.0.1\"\r\n                }\r\n            ]\r\n        },\r\n        \"Internal\": false,\r\n        \"Containers\": {\r\n            \"d0b4a9aa7fe79c4ef30520b2ef63d018c9da764ffde80848040598dd2d8a5e5a\": {\r\n                \"Name\": \"whoami.1.djp6m3izdxubho02qwbafynyc\",\r\n                \"EndpointID\": \"cad773b7986ab912fcda400f897081928e2be69d77c2016270f26da6273f2f66\",\r\n                \"MacAddress\": \"02:42:0a:00:00:03\",\r\n                \"IPv4Address\": \"10.0.0.3/24\",\r\n                \"IPv6Address\": \"\"\r\n            }\r\n        },\r\n        \"Options\": {\r\n            \"com.docker.network.driver.overlay.vxlanid_list\": \"257\"\r\n        },\r\n        \"Labels\": {}\r\n    }\r\n]\r\n\r\n````\r\n\r\nThis is a demonstration, in my real use case I use jwilder/nginx-proxy and I guess because the **containers** fields are empty it cannot detect the service across nodes.\r\n\r\nSo my question is : is it normal that the **containers** field does not contain containers regarding the fact that it is an overlay network I should see the container right ?\r\n\r\n"}}
{"actor":{"display_login":"grimabe"}}