containerd-shim: Do not remount root MS_SLAVE

Mounting as MS_SLAVE here breaks use cases which want to use
rootPropagation=shared in order to expose mounts to the host (and other
containers binding the same subtree), mounting as e.g. MS_SHARED is pointless
in this context so just remove.

Having done this we also need to arrange to manually clean up the mounts on
delete, so do so.

Note that runc will also setup root as required by rootPropagation, defaulting
to MS_PRIVATE.

Fixes #1132.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell
2017-07-07 11:22:53 +01:00
parent 0b3e572b85
commit 8b365117a2
5 changed files with 62 additions and 27 deletions

View File

@@ -67,9 +67,6 @@ func main() {
if err != nil {
return err
}
if err := setupRoot(); err != nil {
return err
}
path, err := os.Getwd()
if err != nil {
return err