{"action":"created","issue":{"url":"https://api.github.com/repos/docker/for-win/issues/1605","repository_url":"https://api.github.com/repos/docker/for-win","labels_url":"https://api.github.com/repos/docker/for-win/issues/1605/labels{/name}","comments_url":"https://api.github.com/repos/docker/for-win/issues/1605/comments","events_url":"https://api.github.com/repos/docker/for-win/issues/1605/events","html_url":"https://github.com/docker/for-win/issues/1605","id":291141148,"node_id":"MDU6SXNzdWUyOTExNDExNDg=","number":1605,"title":"docker swarm isn't reusing named volumes, instead creating new ones","user":{"login":"mawl","id":5493374,"node_id":"MDQ6VXNlcjU0OTMzNzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5493374?v=4","gravatar_id":"","url":"https://api.github.com/users/mawl","html_url":"https://github.com/mawl","followers_url":"https://api.github.com/users/mawl/followers","following_url":"https://api.github.com/users/mawl/following{/other_user}","gists_url":"https://api.github.com/users/mawl/gists{/gist_id}","starred_url":"https://api.github.com/users/mawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mawl/subscriptions","organizations_url":"https://api.github.com/users/mawl/orgs","repos_url":"https://api.github.com/users/mawl/repos","events_url":"https://api.github.com/users/mawl/events{/privacy}","received_events_url":"https://api.github.com/users/mawl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-24T09:39:10Z","updated_at":"2018-12-20T02:00:30Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nWhen deploying services with `docker stack deploy` I would assume that named volumes will be reused on the node.\r\n\r\n### Actual behavior\r\nInstead docker creates a new volume when Container is updated or restarted.\r\n\r\n### Information\r\n* Microsoft Windows Server 2016 [Version 10.0.14393]\r\n* Docker version 17.06.2-ee-5, build 508bb92\r\n\r\nprod.yml\r\n```\r\nversion: '3.2'\r\nservices:\r\n  mongo:\r\n    image: mongo:3.6.0-windowsservercore-ltsc2016\r\n    deploy:\r\n      placement:\r\n        constraints:\r\n          - node.hostname == appsrv02\r\n      endpoint_mode: dnsrr             \r\n    ports:\r\n    - target: 27017\r\n      published: 27017\r\n      protocol: tcp\r\n      mode: host    \r\n    volumes:\r\n    - mongo_data:C:/data/db\r\n    - mongo_config:C:/data/configdb\r\n    \r\n  app:\r\n    image: dockerhub.mycompany.de/buildmanagement/app:latest\r\n    deploy:\r\n      placement:\r\n        constraints:\r\n        - node.hostname == appsrv02\r\n      endpoint_mode: dnsrr\r\n    ports:\r\n    - target: 80\r\n      published: 80\r\n      protocol: tcp\r\n      mode: host\r\n    environment:\r\n    - DB_HOST=mongodb://mongo:27017\r\n    - CALLBACK_WEBSERVICE_URL=http://app.mycompany.de/api/callbacks\r\n    volumes:\r\n    - git-repositories:C:/git-repositories\r\n    secrets:\r\n    - id_rsa\r\n    - known_hosts   \r\n\r\nvolumes:\r\n  mongo_data:\r\n  mongo_config:\r\n  git-repositories:\r\n\r\nnetworks:\r\n  default:\r\n    driver: overlay\r\n \r\nsecrets:\r\n   id_rsa:\r\n     external: true\r\n   known_hosts:\r\n     external: true     \r\n```\r\n### Steps to reproduce the behavior\r\n\r\n1. Deploy a Service into docker swarm\r\n2. Service gets restarted because of an error / update service\r\n3. a new volume is generated and mounted - in Addition to the old named volume - but the destination does only contain files from the last mountpoint.\r\n```\r\n \"Mounts\": [\r\n            {\r\n                \"Type\": \"volume\",\r\n                \"Name\": \"mg_git-repositories\",\r\n                \"Source\": \"C:\\\\ProgramData\\\\docker\\\\volumes\\\\mg_git-repositories\\\\_data\",\r\n                \"Destination\": \"C:\\\\git-repositories\",\r\n                \"Driver\": \"local\",\r\n                \"Mode\": \"\",\r\n                \"RW\": true,\r\n                \"Propagation\": \"\"\r\n            },\r\n            {\r\n                \"Type\": \"volume\",\r\n                \"Name\": \"99194d59bbec381b9308acd3189f662d4b01ccda097b7702c3ea3175c1e5ce54\",\r\n                \"Source\": \"C:\\\\ProgramData\\\\docker\\\\volumes\\\\99194d59bbec381b9308acd3189f662d4b01ccda097b7702c3ea3175c1e5ce54\\\\_data\",\r\n                \"Destination\": \"c:\\\\git-repositories\",\r\n                \"Driver\": \"local\",\r\n                \"Mode\": \"\",\r\n                \"RW\": true,\r\n                \"Propagation\": \"\"\r\n            }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/for-win/issues/comments/448830898","html_url":"https://github.com/docker/for-win/issues/1605#issuecomment-448830898","issue_url":"https://api.github.com/repos/docker/for-win/issues/1605","id":448830898,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODgzMDg5OA==","user":{"login":"docker-for-desktop-robot","id":37411558,"node_id":"MDQ6VXNlcjM3NDExNTU4","avatar_url":"https://avatars1.githubusercontent.com/u/37411558?v=4","gravatar_id":"","url":"https://api.github.com/users/docker-for-desktop-robot","html_url":"https://github.com/docker-for-desktop-robot","followers_url":"https://api.github.com/users/docker-for-desktop-robot/followers","following_url":"https://api.github.com/users/docker-for-desktop-robot/following{/other_user}","gists_url":"https://api.github.com/users/docker-for-desktop-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/docker-for-desktop-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker-for-desktop-robot/subscriptions","organizations_url":"https://api.github.com/users/docker-for-desktop-robot/orgs","repos_url":"https://api.github.com/users/docker-for-desktop-robot/repos","events_url":"https://api.github.com/users/docker-for-desktop-robot/events{/privacy}","received_events_url":"https://api.github.com/users/docker-for-desktop-robot/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T02:00:30Z","updated_at":"2018-12-20T02:00:30Z","author_association":"COLLABORATOR","body":"Issues go stale after 90d of inactivity.\nMark the issue as fresh with `/remove-lifecycle stale` comment.\nStale issues will be closed after an additional 30d of inactivity.\n\nPrevent issues from auto-closing with an `/lifecycle frozen` comment.\n\nIf this issue is safe to close now please do so.\n\nSend feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.\n/lifecycle stale"}}
{"actor":{"display_login":"docker-for-desktop-robot"}}