Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Use use full volume name as mountpoint in mount request and check it to avoid redundant mount. #1220

Closed
pshahzeb opened this issue May 4, 2017 · 0 comments
Assignees

Comments

@pshahzeb
Copy link
Contributor

pshahzeb commented May 4, 2017

If the refcounting hasn't been successful, we try to mount every time we receive a mount request.
Before mounting, need to check if the volume with a given name is already mounted. If it is skip it.
If not checked and skipped, the second (and further) mount fails with resource busy error.

To check it appropriately, use the full volume name as the mount point. In case of short volume names, get the volume and use the full volume name.
Before mounting, check if the volume is already present in /proc/mounts. If it is, skip the mount. and return the mount point.

This also takes care of a volume getting mounted twice : one with a short name and one with a long name on a VM.

@tusharnt tusharnt added this to the 0.14 milestone May 4, 2017
pshahzeb pushed a commit that referenced this issue May 5, 2017
1. Convert a short volume name to the long one. If required to a trip to vmdkops service
2. In every mount request, check if the volume is already mounted (info of /proc/mount)
3. refcount test which kills docker and verifies refcounting

Fixes #1220
pshahzeb pushed a commit that referenced this issue May 5, 2017
1. Convert a short volume name to the long one. If required to a trip to vmdkops service
2. In every mount request, check if the volume is already mounted (info of /proc/mount)
3. refcount test which kills docker and verifies refcounting

Fixes #1220
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants