-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overlay mount xen-tools into user app container
Starting user apps containers by bind mounting xen-tools rootfs doesn't provide sufficient isolation when mounting other files on top of it. Example: when mounting other files on top of xen-tools rootfs, containerd will create stubs for those files in the original rootfs even though it's mounted read-only. To provide better isolation, we need to mount xen-tools rootfs into the container through overlayfs. For this we first create an empty snapshot in containerd which we will use for upper and work directories of the overlayfs. We then mount xen-tools rootfs into the root of the container and the stubs that are created by containerd are now in the snapshot instead of the original rootfs. Since the snapshot is created explicitly by us and protected from being garbage collected we also delete it explicitly when the container is deleted. Signed-off-by: Paul Gaiduk <[email protected]> (cherry picked from commit df0ce58)
- Loading branch information
1 parent
3dc5655
commit 4ba9db8
Showing
7 changed files
with
187 additions
and
63 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
Oops, something went wrong.