{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/29676","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/29676/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/29676/comments","events_url":"https://api.github.com/repos/docker/docker/issues/29676/events","html_url":"https://github.com/docker/docker/issues/29676","id":197396480,"number":29676,"title":"docker stack deploy --compose-file not idempotent when using private images","user":{"login":"marascha","id":24313199,"avatar_url":"https://avatars.githubusercontent.com/u/24313199?v=3","gravatar_id":"","url":"https://api.github.com/users/marascha","html_url":"https://github.com/marascha","followers_url":"https://api.github.com/users/marascha/followers","following_url":"https://api.github.com/users/marascha/following{/other_user}","gists_url":"https://api.github.com/users/marascha/gists{/gist_id}","starred_url":"https://api.github.com/users/marascha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marascha/subscriptions","organizations_url":"https://api.github.com/users/marascha/orgs","repos_url":"https://api.github.com/users/marascha/repos","events_url":"https://api.github.com/users/marascha/events{/privacy}","received_events_url":"https://api.github.com/users/marascha/received_events","type":"User","site_admin":false},"labels":[{"id":450873950,"url":"https://api.github.com/repos/docker/docker/labels/area/bundles","name":"area/bundles","color":"fbca04","default":false},{"id":75627479,"url":"https://api.github.com/repos/docker/docker/labels/kind/question","name":"kind/question","color":"EBEFC9","default":false},{"id":480238176,"url":"https://api.github.com/repos/docker/docker/labels/version/1.13","name":"version/1.13","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-23T16:31:01Z","updated_at":"2016-12-24T17:14:18Z","closed_at":null,"body":"**Description**\r\nI have the following compose file comprising two services based on images from our private registry:\r\n\r\n```\r\nversion: '3.0'\r\n services:\r\n   myservice1:\r\n      image: PRIVATE-REGISTRY-URL/service1:latest\r\n   myservice2:\r\n      image: PRIVATE-REGISTRY-URL/service2:latest\r\n```\r\n\r\n`docker stack deploy ` is as far as I know designed to be idempotent, so I assume the services in the stack to remain unchanged, when the stacks is redeployed but nothing has changed in the compose file nor in the image versions.\r\n \r\nHowever, I'm facing the problem, that all services are getting restarted, every time I deploy the stack using `docker stack deploy --compose-file` . Interestingly, this is not the case, when I first create a bundle using `docker-compose bundle` and then deploy the resulting bundle file using `docker stack deploy --bundle-file`. \r\n\r\nThe problem does not occur when only public images are used in the compose file, so I guess it could have something to do with the communication between docker-engine and our registry.\r\n\r\nAny ideas what could be causing this problem?\r\n\r\n**Output of `docker version`:**\r\nDocker version 1.13.0-rc4, build 88862e7\r\n\r\n**Output of `docker info`:**\r\nContainers: 31\r\n Running: 0\r\n Paused: 0\r\n Stopped: 31\r\nImages: 75\r\nServer Version: 1.13.0-rc4\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 339\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins: \r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\nSwarm: active\r\n NodeID: 6btv07f0tr601zqddji46fn3e\r\n Is Manager: true\r\n ClusterID: eiisduhprkfnyr5rjsb5pakfc\r\n Managers: 1\r\n Nodes: 1\r\n Orchestration:\r\n  Task History Retention Limit: 5\r\n Raft:\r\n  Snapshot Interval: 10000\r\n  Number of Old Snapshots to Retain: 0\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: 192.168.1.2\r\n Manager Addresses:\r\n  192.168.1.2:2377\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e\r\nrunc version: 51371867a01c467f08af739783b8beafc154c4d7\r\ninit version: 949e6fa\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-57-generic\r\nOperating System: Ubuntu 16.04.1 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 7.684 GiB\r\nName: samub\r\nID: RTIN:ARA2:OTVX:WYVE:HI3G:LKXR:6KJF:CEVY:G7OB:TX3Z:LWYS:EMPH\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\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/269092485","html_url":"https://github.com/docker/docker/issues/29676#issuecomment-269092485","issue_url":"https://api.github.com/repos/docker/docker/issues/29676","id":269092485,"user":{"login":"marascha","id":24313199,"avatar_url":"https://avatars.githubusercontent.com/u/24313199?v=3","gravatar_id":"","url":"https://api.github.com/users/marascha","html_url":"https://github.com/marascha","followers_url":"https://api.github.com/users/marascha/followers","following_url":"https://api.github.com/users/marascha/following{/other_user}","gists_url":"https://api.github.com/users/marascha/gists{/gist_id}","starred_url":"https://api.github.com/users/marascha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marascha/subscriptions","organizations_url":"https://api.github.com/users/marascha/orgs","repos_url":"https://api.github.com/users/marascha/repos","events_url":"https://api.github.com/users/marascha/events{/privacy}","received_events_url":"https://api.github.com/users/marascha/received_events","type":"User","site_admin":false},"created_at":"2016-12-24T17:14:18Z","updated_at":"2016-12-24T17:14:18Z","body":"I do not know  much about our docker registry and haven't direct access to it either, but can ask our admins in couple of days. What would be interesting to know? The version of the registry?\r\n\r\nI tried a diff between a service which gets restarted on redeployments (interestingly it does not get restarted on every redployment but maybe every three times or so). Only the following elements were not identical between the old and new version of the service:\r\n\r\n```\r\n\"Version\": {\r\n            \"Index\": 17145\r\n        },\r\n...\r\n\"UpdatedAt\": \"2016-12-24T16:53:00.337962145Z\",\r\n...\r\n \"StartedAt\": \"2016-12-24T16:52:26.464216596Z\",\r\n \"CompletedAt\": \"2016-12-24T16:53:00.337921255Z\",\r\n...\r\n```\r\nEverything else (e.g. TaskTemplate/ContainerSpec/image) was identical.\r\nI did the experiment in debug-mode, but the logs are not revealing anything helpful.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"marascha"}}