Repository navigation
Conversation
Contributor
Author
|
In view of #4434 we may drop this PR (together with --no-pivot), OTOH the fix itself is quite simple. |
kolyshkin
marked this pull request as ready for review
October 13, 2026 00:37
Contributor
Author
|
Not sure why it was draft -- it's not. |
kolyshkin
force-pushed
the
no-pivot-shared
branch
from
October 25, 2026 06:13
755a040 to
4140d02
Compare
When --no-pivot is used, runc moves the container rootfs on top of "/" (using MS_MOVE). If the root mount is shared (e.g. when rootfsPropagation is set to "rshared") and the container rootfs is a mount (e.g. overlay), the move is propagated to the host, resulting in the container rootfs being mounted on top of the host's "/". This breaks the host, e.g. subsequent containers fail to start. To fix, make "/" a slave before the move. Add an integration test. Fixes opencontainers#1961. Assisted-by: Claude Opus 5.5 Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
force-pushed
the
no-pivot-shared
branch
from
October 30, 2026 18:46
4140d02 to
2f37b70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
--no-pivotis used, runc moves the container rootfs on top of/(usingMS_MOVE). If the root mount is shared (e.g. whenrootfsPropagationis set torshared) and the container rootfs is a mount (e.g. overlay), the move is propagated to the host, resulting in the container rootfs being mounted on top of the host's/. This breaks the host, e.g. subsequent containers fail to start.To fix, make
/a slave before the move.Add an integration test (marked as unsafe, since without the fix it breaks the host).
Fixes #1961.