RootfsPropagation behavior has changed as of runc 1.2+ #4804
Unanswered
amberrenton
asked this question in
Q&A
Replies: 1 comment
-
Just wanted to comment on this in case it helps to bring this to the top! Any insights here would be appreciated |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! First off, thanks so much for reading this.
I will start off by saying that I don't think what I'm observing is a regression, although I believe it may be a side effect of this change:
runc run: fix mount leak #4417
Old version: runc v1.1.9
New version: runc v1.2.2
If I create a container with
"rootfsPropagation": "rslave"
, and a rootfs directory at/foo
on the host, I would expect a mount such as/foo/mount
to propagate into the container at/mount
. However, with #4417, the container's rootfs is fully isolated.Repro Steps
runc spec
"rootfsPropagation": "rslave"
strace -f -e unshare,clone,mount,pivot_root,chdir,fchdir runc run strace-test
With runc v1.1.9:
With runc v1.2.2:
With runc v1.2.2, an extra
mount
is unconditionally performed with just theMS_PRIVATE
flag. My understanding - which is pretty rough and may be incorrect - is that this removes it from its peer group, and as a result, it no longer receives propagated events from the rootfs mountpoint on the host. With runc v1.1.9, this extramount
isn't performed, and the container's root directory continues receiving propagated mount events.Using
ctr
to start a sample container with the samerslave
rootfs propagation setting, the difference is illustrated in the propagation flags (from within the container):With runc v1.1.9
With runc v1.2.2
With all of this said, as far as I know, there is no way to work around the change in behavior. Is propagation of mounts from the host to the container (specifically the container root filesystem) still a supported scenario? If so, does anyone have any pointers on how to get that working again? Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions