Repository navigation
Conversation
Signed-off-by: Vincent Batts <[email protected]>
|
Do we also need this for ZFS? I don't see any reference in https://github.com/docker/docker/blob/master/daemon/graphdriver/zfs/zfs.go#L38-L98 |
|
@calavera that needs the input of someone with knowledge and ability to test zfs. |
|
I'm not sure what to expect exactly, but here's what I get for mount calls with this. I though I'd likely see a mention of |
|
@burke this PR would be on the "home" of overlay (e.g. |
|
Oh, that makes sense -- I didn't read the change carefully, clearly. |
|
So why do we do that. What's the rationale behind making home private? |
|
initially it was due to devicemapper. not letting the devices for On Thu, Jun 11, 2015 at 10:08 AM, Vivek Goyal [email protected]
|
|
devices are visible everywhere anyway. For mounts under /var/lib/docker/devicemapper/ they are not visible to containers anyway as container binds mounts to a subdir. /var/lib/docker/devicemapper/mnt/foo. So I am not sure what purpose does it serve. I am sure there should be something. Just want to understand it better. So you have received a problem report somewhere or doing this change just to emulate other drivers? |
|
By default I noticed that libcontainer makes its mount hierarchy MS_PRIVATE. That means anything container mounts will not propagate back to daemon/host anyway. |
|
If we want to protect ourselves against container mount (and not relying on libcontainer), then will MS_SLAVE be a better mount. Where we don't want to receive mount events from container but might want to propgate any mounting host does in /var/lib/docker/mnt/continer-id/ to container? |
|
sorry, the mounted device to be propagated in the mountinfo. The issue was when the mounted device propagated up, then another pid on the host unshares mount namespace. that pid would hold reference to the mounted device in its mountinfo, even though it has nothing to do with that mount. Then when the container exits and docker cleans it up, the device would return EBUSY. I know your deferred removal will mitigate this, but the private mount also addressed this particular issue. |
|
Ok, so two things.
|
|
MS_PRIVATE will make sense only if we don't want to have any future mount point propagation with container in either direction. As libcontainer makes his whole hierarchy private by default, I think that communication does not happen already. So this patch might not be having any affect to begin with. That's why I am curious to know in what use case does it help. |
|
I noticed following comment from alex larsson. May be that's the reason to make /var/lib/docker/devmapper/ private. But if that's the case probably we should have made /var/lib/docker/devmapper/mnt/ as private and not the one directory above it? @alexlarsson CC |
|
@icecrime Not yet. If performance is the reason for making directory private, then I think /var/lib/docker/devmapper/mnt/ should be made private. I think we can leave this code untouched till somebody complains. Once we have better understanding that why should we make a directory private and which directory should be made private then we can make the change. |
|
SGTM, tentatively closing. |
Found when investigating #13775 (comment)
AUFS, btrfs, and devicemapper already do this as well.
Signed-off-by: Vincent Batts [email protected]