Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.4-stable] better isolation for eve user apps #4420

Conversation

europaul
Copy link
Contributor

@europaul europaul commented Nov 4, 2024

Backport of #4304

Add .gitignore file for pkg/pillar directory and include test artifacts
and profiling results.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit d1599b4)
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)
ZFS snapshotter is not used in containerd, as the snapshotting for ZFS
is done by the ZFS filesystem itself. This commit removes the ZFS
snapshotter from the containerd configuration.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit e352fd2)
@europaul europaul marked this pull request as ready for review November 4, 2024 15:49
@github-actions github-actions bot requested review from rucoder and shjala November 4, 2024 15:49
Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope it's fine, as it's a 1-to-1 cherry-pick of the commits that were merged into a branch not that far from 13.4

@europaul
Copy link
Contributor Author

europaul commented Nov 4, 2024

@OhmSpectator let's wait for the Eden tests to finish

@OhmSpectator
Copy link
Member

@OhmSpectator let's wait for the Eden tests to finish

yeah, sure... If they work =(

@europaul
Copy link
Contributor Author

europaul commented Nov 4, 2024

@OhmSpectator I think the Eden tests are skipped because get_run_id failed. could you try restarting it?

@eriknordmark eriknordmark merged commit bdc5af8 into lf-edge:13.4-stable Nov 6, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants