osmount: avoid stale propagated mounts - #516
Open
petrutlucian94 wants to merge 1 commit into
Open
Conversation
We'll need to prevent Coriolis mounts from being propagated to other namespaces belonging to Systemd services. These would be leaked when running "unmount -R" in this namespace, being especially troublesome if the minion gets reused. Stale mounts can prevent the FS from being remounted (e.g. if os-morphing gets retried).
petrutlucian94
commented
Sep 2, 2026
| # remounted (e.g. if os-morphing gets retried). | ||
| # | ||
| # The other "--make-(r)private" calls may no longer be required. | ||
| self._exec_cmd("sudo mount --make-rprivate /") |
Member
Author
There was a problem hiding this comment.
There's also the option of limiting the scope to a given directory, although that would also have to be a mount, e.g.
sudo mkdir -p /mnt/coriolis
# bind /mnt/coriolis to itself so that we can modify propagation rules
sudo mount --bind /mnt/coriolis /mnt/coriolis
sudo mount --make-private /mnt/coriolis
But then we'd have to ensure that all Coriolis mounts go under that path and also avoid rebinding it multiple times.
For simplicity we can stick with sudo mount --make-rprivate /.
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.
We'll need to prevent Coriolis mounts from being propagated to other namespaces belonging to Systemd services.
These would be leaked when running "unmount -R" in this namespace, being especially troublesome if the
minion gets reused. Stale mounts can prevent the FS from being remounted (e.g. if os-morphing gets retried).