Repository navigation
Change mount point propogation to default to slave - #520
Conversation
As an admin I would expect that if I volume mount a partition into a container, and then later add a mount point to the volume, it will show up in the container. Docker-DCO-1.1-Signed-off-by: Dan Walsh <[email protected]> (github: rhatdan)
|
We need this change to allow autofs from the host to work. Is there a good reason to choose PRIVATE over SLAVE? |
|
+1 |
|
@alexlarsson Can you remember the reason why we defaulted to |
|
@crosbymichael I thought some of this had to do with the fact that by default the host mount namespace will not see the container mounts. So the host mount namespace doesn't get polluted |
|
@rhatdan Doesn't something need to change here too https://github.com/rhatdan/libcontainer/blob/slave/rootfs_linux.go#L133 By default the bind mounts are private, are you expecting those bind mounts to be SLAVE also? |
|
@ibuildthecloud With slave the hosts mnt namespace does not see the containers, but the container can see changes to the host if the hosts volume mounted into the container. @ibuildthecloud The bind mounts are the ones passed in as being private, I believe. I tested this out with a docker run -v /usr:/usr fedora /bin/sh, |
|
@rhatdan thanks, let me test this |
|
LGTM |
|
All my tests are good. This patch has minimal impact if your host mounts are set to MS_PRIVATE. |
|
LGTM |
Change mount point propogation to default to slave
|
Cool, only 10 days late :-) @rhatdan asked us to test this; we found no change in container create/destroy performance between docker-1.5 and docker-1.6. |
|
@jeremyeder Good to know :) |
As an admin I would expect that if I volume mount a partition into a container, and then later add a mount point to the volume, it will show up in the container.
Docker-DCO-1.1-Signed-off-by: Dan Walsh [email protected] (github: rhatdan)