feat: squashfuse unpriv SIF image mount (experimental)#711
Merged
dtrudg merged 3 commits intosylabs:masterfrom Apr 25, 2022
Merged
feat: squashfuse unpriv SIF image mount (experimental)#711dtrudg merged 3 commits intosylabs:masterfrom
dtrudg merged 3 commits intosylabs:masterfrom
Conversation
7901607 to
c8123ae
Compare
d6a9919 to
2b952f5
Compare
3bb809d to
32be4d0
Compare
Allow SIF images to be mounted with `squashfuse` in the unpriv / user-namespace flow. The approach take here is to: * Leverage the `MountFUSE` / `UnmountFUSE` functionality from sylabs/sif, rather than duplicating code. * Perform the mount onto a temporary directory in the CLI layer, at the point where the SIF would otherwise be extracted. The singularity runtime then sees a sandbox. * Add a 'CLEANUP_HOST' process that is forked from `starter` early, before any namespace manipulation. This process is able to unmount the SIF at cleanup time. A socket from the host cleanup process to the master process is used for coordination. Mount at the CLI layer, rather than inside of the runtime engine, is used so that we can adopt a similar approach across `singularity oci` commands, and general use of runc in future. `--fakeroot` is not currently supported. `instance start` is not currently supported. Fixes sylabs#718
tri-adam
approved these changes
Apr 25, 2022
Member
tri-adam
left a comment
There was a problem hiding this comment.
LGTM, small nit regarding contexts. Nice work!
Member
Wouldn't hurt, as long as it's default to off? |
Allows singularity.conf to force an attempt to use SIF squashfuse mounting. Still falls back to SIF extraction on failure.
Note that cleanup host context is left as a TODO at the same level as the context.TODO in the master process... for future consideration.
tri-adam
approved these changes
Apr 25, 2022
dtrudg
added a commit
to dtrudg/singularity
that referenced
this pull request
Jun 30, 2022
`if err :=` was incorrectly used in sylabs#711, resulting in a nil error return. Fixes sylabs#897
dtrudg
added a commit
to dtrudg/singularity
that referenced
this pull request
Jul 14, 2022
`if err :=` was incorrectly used in sylabs#711, resulting in a nil error return. Fixes sylabs#897
dtrudg
added a commit
to dtrudg/singularity
that referenced
this pull request
Jul 15, 2022
`if err :=` was incorrectly used in sylabs#711, resulting in a nil error return. Fixes sylabs#897
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.
Allow SIF images to be mounted with
squashfusein the unpriv / user-namespace flow.The approach take here is to:
MountFUSE/UnmountFUSEfunctionality from sylabs/sif, rather than duplicating code.starterearly, before any namespace manipulation. This process is able to unmount the SIF at cleanup time. A socket from the host cleanup process to the master process is used for coordination.Mount at the CLI layer, rather than inside of the runtime engine, is used so that we can adopt a similar approach across
singularity ocicommands, and general use of runc in future.--fakerootis not currently supported.instance startis not currently supported.Fixes #718
Unsolved questions?
singularity.confto always try? It is experimental, and there's a flag + env-var... but other experimental features have had a conf option in the past.