-
Notifications
You must be signed in to change notification settings - Fork 95
Docker compatibility (post 1.12) - Do not increment reference count for a volume if the mount fails. #608
Comments
The fix will be submitted once we have the next version >1.12 of docker where this fix should be available. |
Docker PR 27116 is still open and this change can be made once thats in. |
link moby/moby#27116 |
Docker issue has been closed and should be available in the upcoming release. Will post PR then. |
Docker 1.1.13 is out and am checking with that if the fix is in it and will post the changes. |
Docker version Server: Command : Uses -w option, docker doesn't issue an unmount on mount failure docker run --rm -it -w /data -v mount-err:/data busybox 2016-11-22 21:56:34.903730934 -0800 PST [INFO] Attaching volume and creating filesystem name=mount-err fstype=ext4 Command : Omitted -w option, docker issues an unmount when mount fails $ docker volume create -d vmdk --name mount-err1 $ docker run --rm -it -v mount-err1:/data busybox 2016-11-22 23:26:29.284317429 -0800 PST [INFO] Going into ServeUnix - Listening on Unix socket address="/run/docker/plugins/vmdk.sock" Client: Server: In Docker version 1.12.2 the behavior is different, docker tries to detach even if unmount fails. Command: -w option is omitted and unmount is issued. $ docker run --rm -it -v test-um1:/data busybox 2016-11-22 23:34:08.106557938 -0800 PST [INFO] Mounting volume name=test-um1 |
Tried with 1.13.0-rc-1 and there is no unmount if mount fails (with or without -w option). $ docker run --rm -it -v test-um3:/data busybox $ docker run --rm -it -v test-um3:/data busybox 2016-11-23 05:29:31.622969018 -0800 PST [INFO] Attaching volume and creating filesystem fstype=ext4 name=test-um3 As seen there is no refcounting issue (this has the fix for the issue) |
Fixed by #906 |
Fix for docker issue moby/moby#22564 has resulted in moby/moby#27116 to send an unmount to the plugin only if the mount actually succeeded. The plugin.go:Mount() function needs to handle the change by incrementing the refcount on a volume only if the mount succeeded. This change will be needed post 1.12 when the Docker fix becomes available.
The text was updated successfully, but these errors were encountered: