{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/docker/issues/31115","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/31115/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/31115/comments","events_url":"https://api.github.com/repos/docker/docker/issues/31115/events","html_url":"https://github.com/docker/docker/issues/31115","id":208418866,"number":31115,"title":"'docker stack deploy' randomly updates services that haven't changed","user":{"login":"markvr","id":1990337,"avatar_url":"https://avatars.githubusercontent.com/u/1990337?v=3","gravatar_id":"","url":"https://api.github.com/users/markvr","html_url":"https://github.com/markvr","followers_url":"https://api.github.com/users/markvr/followers","following_url":"https://api.github.com/users/markvr/following{/other_user}","gists_url":"https://api.github.com/users/markvr/gists{/gist_id}","starred_url":"https://api.github.com/users/markvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markvr/subscriptions","organizations_url":"https://api.github.com/users/markvr/orgs","repos_url":"https://api.github.com/users/markvr/repos","events_url":"https://api.github.com/users/markvr/events{/privacy}","received_events_url":"https://api.github.com/users/markvr/received_events","type":"User","site_admin":false},"labels":[{"id":392678049,"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04","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":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-17T11:47:53Z","updated_at":"2017-02-17T14:05:56Z","closed_at":"2017-02-17T14:05:56Z","body":"**Description**\r\n\r\nWhen doing ` docker stack deploy -c test.yaml test`, services in the stack will randomly be updated, even if there are no changes.  Weirdly, this only seems to be the case for services that have environment variables, but it's hard to investigate because the issue is transient.\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a simple test stack, with environment variables for a service\r\n2. Repeatedly run ` docker stack deploy -c test.yaml test`, checking the update status with `docker service inspect` each time.\r\n\r\ne.g. stack file\r\n\r\n```\r\nversion: \"3\"\r\nservices:\r\n  tomcat:\r\n    image:  tomcat\r\n    deploy:\r\n      mode: replicated\r\n      replicas: 1\r\n      update_config:\r\n        parallelism: 1\r\n        failure_action: pause\r\n        max_failure_ratio: 0\r\n      placement:\r\n        constraints:\r\n          - node.role != manager\r\n    environment:\r\n      APP_ACTIVE_ENVIRONMENTS: preprod\r\n      EXTRA_SETTINGS: server failover out-of-service:80 backup\r\n      HTTP_CHECK: OPTIONS /azure-test-webapp HTTP/1.1\\r\\nHost:\\ www\r\n      SERVICE_PORTS: 8080\r\n      VIRTUAL_HOST: https://azure-docker-swarm-test-prod.service\r\n      COOKIE: SRV insert indirect nocache\r\n      FORCE_SSL: \"true\"\r\n```\r\nLoop script:\r\n\r\n```\r\nfor i in `seq 1 10`;\r\ndo\r\n  docker stack deploy -c env-vars.yaml test; docker service inspect test_tomcat | jq '.[0] | {UpdateStatus}' -c\r\n  sleep 60\r\ndone\r\n```\r\n\r\nOutput:\r\n\r\n```\r\nswarm-manager000000:~$ ./loop\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"State\":\"updating\",\"StartedAt\":\"2017-02-17T11:12:39.4027968Z\",\"CompletedAt\":\"1970-01-01T00:00:00Z\",\"Message\":\"update in progress\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"State\":\"updating\",\"StartedAt\":\"2017-02-17T11:16:59.068760564Z\",\"CompletedAt\":\"1970-01-01T00:00:00Z\",\"Message\":\"update in progress\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"State\":\"updating\",\"StartedAt\":\"2017-02-17T11:18:03.755051094Z\",\"CompletedAt\":\"1970-01-01T00:00:00Z\",\"Message\":\"update in progress\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\n```\r\n\r\n**Describe the results you expected:**\r\nOutput to always be:\r\n```\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"StartedAt\":\"0001-01-01T00:00:00Z\",\"CompletedAt\":\"0001-01-01T00:00:00Z\"}}\r\n```\r\nBut sometimes it is:\r\n\r\n```\r\nUpdating service test_tomcat (id: ycet112q4pilqi6urpewlk14g)\r\n{\"UpdateStatus\":{\"State\":\"updating\",\"StartedAt\":\"2017-02-17T11:18:03.755051094Z\",\"CompletedAt\":\"1970-01-01T00:00:00Z\",\"Message\":\"update in progress\"}}\r\n```\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\nThis is transient, and only appears to be the case for stack files with environment variables, but that may or may not be relevant.\r\n\r\n**Output of `docker version`:**\r\n\r\nThis is using the latest released \"docker-for-azure\"\r\n\r\n```\r\nswarm-manager000000:~$ docker version\r\nClient:\r\n Version:      1.13.0\r\n API version:  1.25\r\n Go version:   go1.7.3\r\n Git commit:   49bf474\r\n Built:        Tue Jan 17 21:19:34 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.13.0\r\n API version:  1.25 (minimum version 1.12)\r\n Go version:   go1.7.3\r\n Git commit:   49bf474\r\n Built:        Tue Jan 17 21:19:34 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nswarm-manager000000:~$ docker info\r\nContainers: 25\r\n Running: 8\r\n Paused: 0\r\n Stopped: 17\r\nImages: 20\r\nServer Version: 1.13.0\r\nStorage Driver: overlay2\r\n Backing Filesystem: extfs\r\n Supports d_type: true\r\n Native Overlay Diff: true\r\nLogging Driver: syslog\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host ipvlan macvlan null overlay\r\nSwarm: active\r\n NodeID: hwdser1fzpu2ygtxmcpxa9y0l\r\n Is Manager: true\r\n ClusterID: uaxb7n1n2zfvlzepmrgvdfveu\r\n Managers: 1\r\n Nodes: 2\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: 10.240.4.5\r\n Manager Addresses:\r\n  10.240.4.5:2377\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e\r\nrunc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.9.4-moby\r\nOperating System: Alpine Linux v3.5\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 1.635 GiB\r\nName: swarm-manager000000\r\nID: R23C:27VL:ZBA3:HHJW:ROSU:GCTP:GVBP:36T5:OD4I:DB3C:WBS2:CIE6\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 127\r\n Goroutines: 250\r\n System Time: 2017-02-17T11:44:54.417270752Z\r\n EventsListeners: 3\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: true\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nUsing docker-for-azure\r\n\r\nI will shortly be away until 1st March, and so will follow up on any comments then."}}
{"actor":{"display_login":"markvr"}}