You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
storage: overlay: only unmount storage home if needed
If the storage home directory is a mountpoint, `mount.MakePrivate()`
changes the existing mountpoint instead of creating a new bind mount
of the storage home onto itself. In this case, attempting to unmount
the storage home upon cleanup will remove the externally created
mountpoint, thus breaking the pre-existing system configuration.
Since it is not easily possible to detect whether a given mountpoint
is a self-bind-mount, instead remember whether we ended up performing
one and only attempt to unmount it if we did.
This should be considered a hack because it leaks the implementation
details of `mount.MakePrivate()` (i.e. the fact that a new bind mount
is only created if the target is not already a mountpoint).
Fixes: containers/podman#27012
Signed-off-by: Ivan Shapovalov <[email protected]>
0 commit comments