-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sysbox performs uid-shifting using chown for host dirs that are mounted into certain special dirs in the container (e.g., /var/lib/docker, /var/lib/kubelet, etc.) Prior to this change, the uid shifting via chown worked well when the host dir was initially owned by root:root. In this case, when the container started, Sysbox would shift uids to match the container's root user (e.g., 165536:165536); later when the container stopped, Sysbox would revert the uids back to the original one (i.e, root:root). However, we've seen situations where the uid revert may not occur because the host dir gets detached from the host. In this case, a subsequent creation of a container where said host dir is again mounted into a special dir in the container, would result in Sysbox not performing or mishandling the uid shifting. This commit fixes this by ensuring that Sysbox always performs the uid shifting regardless of the original uid associated with the host dir being mounted into the container. Signed-off-by: Cesar Talledo <ctalledo@nestybox.com>
- Loading branch information
Showing
3 changed files
with
30 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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