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

feat: Experimental squashfuse unprivileged SIF mount (actions) #718

Closed
dtrudg opened this issue Apr 18, 2022 · 0 comments · Fixed by #711
Closed

feat: Experimental squashfuse unprivileged SIF mount (actions) #718

dtrudg opened this issue Apr 18, 2022 · 0 comments · Fixed by #711
Assignees
Labels
enhancement New feature or request

Comments

@dtrudg
Copy link
Member

dtrudg commented Apr 18, 2022

Describe the solution you'd like

Using experimental functionality in sylabs/sif add a means to mount SIF files with squashfuse, so that they can be used without privilege, without needing to extract to a temporary sandbox directory.

Implementation should be outside of the Singularity runtime engine, as it should be adaptable for mounts with the oci command group, and future plans involving using an OCI low-level runtime.

@dtrudg dtrudg added the enhancement New feature or request label Apr 18, 2022
@dtrudg dtrudg added this to the SingularityCE 3.10 milestone Apr 18, 2022
@dtrudg dtrudg self-assigned this Apr 18, 2022
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 18, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 18, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 18, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 21, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 21, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 21, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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.

Fixes sylabs#718
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 21, 2022
Allow SIF images to be mounted with `squashfuse` in the unpriv /
user-namespace flow.

The approach take here is to:

* Leverage the `Mount` 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 'host cleanup' process that is forked from `starter` early,
  before any namespace manipulation. This process is able to `fusermount
  -u` 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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 21, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 22, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 22, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 22, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 22, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 22, 2022
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
dtrudg added a commit to dtrudg/singularity that referenced this issue Apr 25, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant