{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/1468","labels_url":"https://api.github.com/repos/docker/swarm/issues/1468/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/1468/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/1468/events","html_url":"https://github.com/docker/swarm/issues/1468","id":119577561,"number":1468,"title":"Docker PS from Swarm and Node Daemon are Different for Some Containers","user":{"login":"ekristen","id":48329,"avatar_url":"https://avatars.githubusercontent.com/u/48329?v=3","gravatar_id":"","url":"https://api.github.com/users/ekristen","html_url":"https://github.com/ekristen","followers_url":"https://api.github.com/users/ekristen/followers","following_url":"https://api.github.com/users/ekristen/following{/other_user}","gists_url":"https://api.github.com/users/ekristen/gists{/gist_id}","starred_url":"https://api.github.com/users/ekristen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekristen/subscriptions","organizations_url":"https://api.github.com/users/ekristen/orgs","repos_url":"https://api.github.com/users/ekristen/repos","events_url":"https://api.github.com/users/ekristen/events{/privacy}","received_events_url":"https://api.github.com/users/ekristen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-30T20:46:24Z","updated_at":"2015-12-02T19:32:06Z","closed_at":null,"body":"Not really sure how to best describe this, but docker ps is reporting different information via swarm vs the node's daemon.\r\n\r\nWhile docker ps is not a huge deal, I think this is having some side affects with docker compose and when it goes to deploy a new version of an image, constraints are failing when looking for the current container==CONTAINER_ID\r\n\r\nSwarm Version: 1.0.0\r\nDocker Version: 1.8.1 (on the master, on the slave)\r\n\r\n`docker ps` from Swarm Master\r\n```\r\nCONTAINER ID        IMAGE                                COMMAND                  CREATED             STATUS                         NAMES\r\n9a2278a12aa0        index.private.io/reports             \"node server/index.js\"   11 days ago         Restarting (5) 7 days ago      staging-apps02/app_reports_1\r\nef58f2bd3b0e        index.private.io/reports:dev         \"node app.js\"            12 days ago         Restarting (1) 9 minutes ago   staging-apps02/app2_reports_1\r\n```\r\n\r\n`docker ps` from the actual docker daemon\r\n```\r\nCONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS              NAMES\r\n9a2278a12aa0        index.private.io/reports              \"node server/index.js\"   11 days ago         Up 7 days           app_reports_1\r\nef58f2bd3b0e        index.private.io/reports:dev          \"node app.js\"            12 days ago         Up 46 seconds       app2_reports_1\r\n```\r\n\r\n`docker inspect staging-apps02/app_reports_1` from swarm master\r\n```\r\n[\r\n{\r\n    \"Id\": \"9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2\",\r\n    \"Created\": \"2015-11-18T22:02:59.851932524Z\",\r\n    \"Path\": \"node\",\r\n    \"Args\": [\r\n        \"server/index.js\"\r\n    ],\r\n    \"State\": {\r\n        \"Running\": true,\r\n        \"Paused\": false,\r\n        \"Restarting\": false,\r\n        \"OOMKilled\": false,\r\n        \"Dead\": false,\r\n        \"Pid\": 3328,\r\n        \"ExitCode\": 0,\r\n        \"Error\": \"\",\r\n        \"StartedAt\": \"2015-11-23T18:40:10.716378013Z\",\r\n        \"FinishedAt\": \"2015-11-23T18:40:10.563824412Z\"\r\n    },\r\n    \"Image\": \"c86e29bafb5f0259d604a660443aa79e804d788895565e077a208119cf80e2af\",\r\n    \"NetworkSettings\": {\r\n        \"Bridge\": \"\",\r\n        \"EndpointID\": \"0fb4b59753e5a1b382f8a2ff6df42e0f6fa331f80a6b66d290056bd1e89dc09b\",\r\n        \"Gateway\": \"172.17.42.1\",\r\n        \"GlobalIPv6Address\": \"\",\r\n        \"GlobalIPv6PrefixLen\": 0,\r\n        \"HairpinMode\": false,\r\n        \"IPAddress\": \"172.17.0.3\",\r\n        \"IPPrefixLen\": 16,\r\n        \"IPv6Gateway\": \"\",\r\n        \"LinkLocalIPv6Address\": \"\",\r\n        \"LinkLocalIPv6PrefixLen\": 0,\r\n        \"MacAddress\": \"02:42:ac:11:00:03\",\r\n        \"NetworkID\": \"407e1ff1e5b979168e1c6ac8156f2cf354cb41a6e50b6bf173b4218d3775a592\",\r\n        \"PortMapping\": null,\r\n        \"Ports\": {\r\n            \"5858/tcp\": [\r\n                {\r\n                    \"HostIp\": \"10.10.xxx.85\",\r\n                    \"HostPort\": \"32769\"\r\n                }\r\n            ]\r\n        },\r\n        \"SandboxKey\": \"/var/run/docker/netns/9a2278a12aa0\",\r\n        \"SecondaryIPAddresses\": null,\r\n        \"SecondaryIPv6Addresses\": null\r\n    },\r\n    \"ResolvConfPath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/resolv.conf\",\r\n    \"HostnamePath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/hostname\",\r\n    \"HostsPath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/hosts\",\r\n    \"LogPath\": \"\",\r\n    \"Node\": {\r\n        \"ID\": \"VSGE:MRDP:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:ZQNI:HVYC:5ANI:57CG\",\r\n        \"IP\": \"10.10.xxx.85\",\r\n        \"Addr\": \"10.10.xxx.85:3276\",\r\n        \"Name\": \"staging-apps02\",\r\n        \"Cpus\": 2,\r\n        \"Memory\": 8371814400,\r\n        \"Labels\": {\r\n            \"5858/tcp\": {}\r\n        },\r\n        \"PublishService\": \"\",\r\n        \"Tty\": false,\r\n        \"OpenStdin\": false,\r\n        \"StdinOnce\": false,\r\n        \"Env\": [\r\n        ],\r\n        \"Cmd\": [\r\n            \"node\",\r\n            \"server/index.js\"\r\n        ],\r\n        \"Image\": \"index.private.io/reports\",\r\n        \"Volumes\": null,\r\n        \"VolumeDriver\": \"\",\r\n        \"WorkingDir\": \"/opt/app\",\r\n        \"Entrypoint\": null,\r\n        \"NetworkDisabled\": false,\r\n        \"MacAddress\": \"\",\r\n        \"OnBuild\": null,\r\n        \"Labels\": {\r\n            \"com.docker.compose.config-hash\": \"b258236c9bf8799ad4f6bbfea1bb4c586647a2cbc17baa10d01d129e3de03d6d\",\r\n            \"com.docker.compose.container-number\": \"1\",\r\n            \"com.docker.compose.oneoff\": \"False\",\r\n            \"com.docker.compose.project\": \"app\",\r\n            \"com.docker.compose.service\": \"reports\",\r\n            \"com.docker.compose.version\": \"1.5.1\",\r\n            \"com.docker.swarm.affinities\": \"[\\\"container==dd8d47caca391c30a77b213093decd999741db5746ed648a4116971a5925f472\\\"]\",\r\n            \"com.docker.swarm.constraints\": \"[\\\"purpose==frontends\\\"]\",\r\n            \"com.docker.swarm.id\": \"c485e2661b727eabe0eec072ca97462bbcc84842c66f867ae1f3c925b8490396\"\r\n        }\r\n    }\r\n}\r\n]\r\n```\r\n\r\n`docker ps` from local docker daemon\r\n```\r\n[\r\n{\r\n    \"Id\": \"9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2\",\r\n    \"Created\": \"2015-11-18T22:02:59.851932524Z\",\r\n    \"Path\": \"node\",\r\n    \"Args\": [\r\n        \"server/index.js\"\r\n    ],\r\n    \"State\": {\r\n        \"Running\": true,\r\n        \"Paused\": false,\r\n        \"Restarting\": false,\r\n        \"OOMKilled\": false,\r\n        \"Dead\": false,\r\n        \"Pid\": 3328,\r\n        \"ExitCode\": 0,\r\n        \"Error\": \"\",\r\n        \"StartedAt\": \"2015-11-23T18:40:10.716378013Z\",\r\n        \"FinishedAt\": \"2015-11-23T18:40:10.563824412Z\"\r\n    },\r\n    \"Image\": \"c86e29bafb5f0259d604a660443aa79e804d788895565e077a208119cf80e2af\",\r\n    \"NetworkSettings\": {\r\n        \"Bridge\": \"\",\r\n        \"EndpointID\": \"0fb4b59753e5a1b382f8a2ff6df42e0f6fa331f80a6b66d290056bd1e89dc09b\",\r\n        \"Gateway\": \"172.17.42.1\",\r\n        \"GlobalIPv6Address\": \"\",\r\n        \"GlobalIPv6PrefixLen\": 0,\r\n        \"HairpinMode\": false,\r\n        \"IPAddress\": \"172.17.0.3\",\r\n        \"IPPrefixLen\": 16,\r\n        \"IPv6Gateway\": \"\",\r\n        \"LinkLocalIPv6Address\": \"\",\r\n        \"LinkLocalIPv6PrefixLen\": 0,\r\n        \"MacAddress\": \"02:42:ac:11:00:03\",\r\n        \"NetworkID\": \"407e1ff1e5b979168e1c6ac8156f2cf354cb41a6e50b6bf173b4218d3775a592\",\r\n        \"PortMapping\": null,\r\n        \"Ports\": {\r\n            \"5858/tcp\": [\r\n                {\r\n                    \"HostIp\": \"0.0.0.0\",\r\n                    \"HostPort\": \"32769\"\r\n                }\r\n            ]\r\n        },\r\n        \"SandboxKey\": \"/var/run/docker/netns/9a2278a12aa0\",\r\n        \"SecondaryIPAddresses\": null,\r\n        \"SecondaryIPv6Addresses\": null\r\n    },\r\n    \"ResolvConfPath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/resolv.conf\",\r\n    \"HostnamePath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/hostname\",\r\n    \"HostsPath\": \"/var/lib/docker/containers/9a2278a12aa0d28edf0471d6f189a69637415eed73b91de1ca0bd28fd9a4f7f2/hosts\",\r\n    \"LogPath\": \"\",\r\n    \"Name\": \"/app_reports_1\",\r\n    \"RestartCount\": 8,\r\n    \"Driver\": \"aufs\",\r\n    \"ExecDriver\": \"native-0.2\",\r\n    \"MountLabel\": \"\",\r\n    \"ProcessLabel\": \"\",\r\n    \"AppArmorProfile\": \"\",\r\n    \"ExecIDs\": null,\r\n    \"HostConfig\": {\r\n        \"Binds\": [],\r\n        \"ContainerIDFile\": \"\",\r\n        \"LxcConf\": null,\r\n        \"Memory\": 0,\r\n        \"MemorySwap\": 0,\r\n        \"CpuShares\": 0,\r\n        \"CpuPeriod\": 0,\r\n        \"CpusetCpus\": \"\",\r\n            \"5858/tcp\": {}\r\n        },\r\n        \"PublishService\": \"\",\r\n        \"Tty\": false,\r\n        \"OpenStdin\": false,\r\n        \"StdinOnce\": false,\r\n        \"Env\": [\r\n        ],\r\n        \"Cmd\": [\r\n            \"node\",\r\n            \"server/index.js\"\r\n        ],\r\n        \"Image\": \"index.private.io/reports:dev\",\r\n        \"Volumes\": null,\r\n        \"VolumeDriver\": \"\",\r\n        \"WorkingDir\": \"/opt/app\",\r\n        \"Entrypoint\": null,\r\n        \"NetworkDisabled\": false,\r\n        \"MacAddress\": \"\",\r\n        \"OnBuild\": null,\r\n        \"Labels\": {\r\n            \"com.docker.compose.config-hash\": \"b258236c9bf8799ad4f6bbfea1bb4c586647a2cbc17baa10d01d129e3de03d6d\",\r\n            \"com.docker.compose.container-number\": \"1\",\r\n            \"com.docker.compose.oneoff\": \"False\",\r\n            \"com.docker.compose.project\": \"app\",\r\n            \"com.docker.compose.service\": \"reports\",\r\n            \"com.docker.compose.version\": \"1.5.1\",\r\n            \"com.docker.swarm.affinities\": \"[\\\"container==dd8d47caca391c30a77b213093decd999741db5746ed648a4116971a5925f472\\\"]\",\r\n            \"com.docker.swarm.constraints\": \"[\\\"purpose==frontends\\\"]\",\r\n            \"com.docker.swarm.id\": \"c485e2661b727eabe0eec072ca97462bbcc84842c66f867ae1f3c925b8490396\"\r\n        }\r\n    }\r\n}\r\n]\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/161407823","html_url":"https://github.com/docker/swarm/issues/1468#issuecomment-161407823","issue_url":"https://api.github.com/repos/docker/swarm/issues/1468","id":161407823,"user":{"login":"dongluochen","id":14985073,"avatar_url":"https://avatars.githubusercontent.com/u/14985073?v=3","gravatar_id":"","url":"https://api.github.com/users/dongluochen","html_url":"https://github.com/dongluochen","followers_url":"https://api.github.com/users/dongluochen/followers","following_url":"https://api.github.com/users/dongluochen/following{/other_user}","gists_url":"https://api.github.com/users/dongluochen/gists{/gist_id}","starred_url":"https://api.github.com/users/dongluochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongluochen/subscriptions","organizations_url":"https://api.github.com/users/dongluochen/orgs","repos_url":"https://api.github.com/users/dongluochen/repos","events_url":"https://api.github.com/users/dongluochen/events{/privacy}","received_events_url":"https://api.github.com/users/dongluochen/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T19:32:06Z","updated_at":"2015-12-02T19:32:06Z","body":"@batmat Thanks for your message. Your case is different from @ekristen. In your case I think the container `fad4b552d531` has never started and swarm reports empty for at 'STATUS' column. It's a reporting difference from docker (maybe we should correct it). The problem reported by @ekristen looks like swarm couldn't refresh container state.  "}}