moby: service update "--mount-add" fails with "duplicate mount point"
Updating a service to replace a volume with a different volume fails with “duplicate mount point”
To reproduce:
$ docker service create --name=foo --mount type=volume,source=volume1,target=/foo nginx:alpine
foo
$docker service update --mount-add type=volume,source=volume2,target=/foo foo
foo
Then see tasks failing:
$ docker service ps foo
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
0c7uelw2fk0qkeneww14g553m foo.1 nginx:alpine 7e44720a5b2a Ready Rejected 1 second ago "Duplicate mount point '/foo"
ckhrp1iq2rh5ehabqxw5992e2 \_ foo.1 nginx:alpine 7e44720a5b2a Shutdown Rejected 6 seconds ago "Duplicate mount point '/foo"
38ycpjw10baw0lyfr7sjuhnul \_ foo.1 nginx:alpine 7e44720a5b2a Shutdown Rejected 11 seconds ago "Duplicate mount point '/foo"
1mz8x3nwhj3hrxtjlbtbic9y3 \_ foo.1 nginx:alpine 7e44720a5b2a Shutdown Rejected 16 seconds ago "Duplicate mount point '/foo"
0k3oycgrzzurzoi8pvjg6teg0 \_ foo.1 nginx:alpine 7e44720a5b2a Shutdown Rejected 20 seconds ago "Duplicate mount point '/foo"
$ docker inspect 0c7uelw2fk0qkeneww14g553m
...
"Status": {
"Timestamp": "2016-08-16T21:09:40.972455571Z",
"State": "rejected",
"Message": "preparing",
"Err": "Duplicate mount point '/foo'",
"ContainerStatus": {}
},
...
Tested on current master, https://github.com/docker/docker/commit/641e1564cfeb3f94f68f3c43a353df10331afecf
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (15 by maintainers)
Commits related to this issue
- Check for duplicate mount points in ServiceSpec Duplicate mount points are not allowed in serviceSpec. Validation for same was missing in swarmkit. Ref: https://github.com/docker/docker/issues/25772... — committed to kunalkushwaha/swarmkit by kunalkushwaha 8 years ago
- Check for duplicate mount points in ServiceSpec Duplicate mount points are not allowed in serviceSpec. Validation for same was missing in swarmkit. Ref: https://github.com/docker/docker/issues/25772... — committed to kunalkushwaha/swarmkit by kunalkushwaha 8 years ago
- Check for duplicate mount points in ServiceSpec Duplicate mount points are not allowed in serviceSpec. Validation for same was missing in swarmkit. Ref: https://github.com/docker/docker/issues/25772... — committed to kunalkushwaha/swarmkit by kunalkushwaha 8 years ago
- duplicate mount points are not allowed in serviceSpec. Validation for same was missing in swarmkit. Ref: docker/docker#25772 Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> — committed to kunalkushwaha/swarmkit by kunalkushwaha 8 years ago
- duplicate mount points are not allowed in serviceSpec. Validation for same was missing in swarmkit. Ref: docker/docker#25772 Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> — committed to vasil-yordanov/swarmkit by kunalkushwaha 8 years ago
@stevvooe understood 😃. Will make a PR in swarmkit for validation.