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

Remove privileged mode with Fusion #4141

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bentsherman
Copy link
Member

@bentsherman bentsherman commented Aug 1, 2023

Close #3337

Currently includes:

  • Docker
  • Podman
  • Wave debug command
  • AWS Batch

Not sure yet what's needed for Singularity, but there is the --fusemount option.

Not sure if AWS Batch supports device capabilities for containers. The --device option is supported under LinuxParameters and a Device can have permissions READ | WRITE | MKNOD.

Waiting for @jordeu to advise on the remaining implementation.

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 51d3297
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/662ab98e1364d100086b7ea0

Signed-off-by: Ben Sherman <[email protected]>
@pditommaso
Copy link
Member

Were these changes tested?

@bentsherman
Copy link
Member Author

Not yet, just following your and Jordi's suggestions. I can test them later, and try K8s to see if any permissions are not needed.

@pditommaso
Copy link
Member

This stuff is tricky, and there may be differences across linux and mac implementations. It could even be necessary to implement as an opt-in feature.

@bentsherman
Copy link
Member Author

Regarding the testing, haven't all of these changes except for K8s already been tested? I assume you guys tested docker and podman by setting docker.fusionOptions.

@pditommaso
Copy link
Member

I've tried once, but was a kind of mess. Also there have been a lot of changes recently with this problem with the root user, etc. Nothing can be taken for granted

@pditommaso pditommaso force-pushed the master branch 2 times, most recently from 81f7cb7 to 8a43489 Compare August 20, 2023 20:13
@bentsherman
Copy link
Member Author

@pditommaso do you still want to merge the non-K8s bits of this PR?

@pditommaso
Copy link
Member

it would be nice, @jordeu recently wrote some useful guidelines about this

  • Fuse device /dev/fuse should be mounted inside the container.
  • with Kernel version below 4.18, you need to run it with CAP_SYS_ADMIN capability or --privileged flag.
  • with Docker you need to unconfine the container with --security-opt apparmor=unconfined option or define an apparmor profile that allows the container to use fuse devices.
  • Also seccomp profile should be unconfined with --security-opt seccomp=unconfined option in some cases.

JosephLalli added a commit to JosephLalli/nextflow that referenced this pull request Jan 17, 2024
@bentsherman bentsherman requested a review from a team as a code owner April 3, 2024 14:39
@pditommaso
Copy link
Member

@jordeu can you please review this one more time?

Copy link
Collaborator

@jordeu jordeu left a comment

Choose a reason for hiding this comment

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

I've double-checked, and everything is working

@pditommaso
Copy link
Member

It turns out, it does not work on mac

2024-04-25 22:35:26 8:35PM WRN Error running in a new user namespace - fork/exec /usr/bin/fusion: invalid argument
2024-04-25 22:35:26 
2024-04-25 22:35:29 8:35PM ERR mount.go:204 > mount fail error="exec: \"/bin/fusermount\": stat /bin/fusermount: no such file or directory"

@jordeu
Copy link
Collaborator

jordeu commented Apr 26, 2024

It turns out, it does not work on mac

2024-04-25 22:35:26 8:35PM WRN Error running in a new user namespace - fork/exec /usr/bin/fusion: invalid argument
2024-04-25 22:35:26 
2024-04-25 22:35:29 8:35PM ERR mount.go:204 > mount fail error="exec: \"/bin/fusermount\": stat /bin/fusermount: no such file or directory"

With docker or podman?

@pditommaso
Copy link
Member

Docker

@jordeu
Copy link
Collaborator

jordeu commented Apr 26, 2024

Are you using Docker Desktop? What version? Can you check the Kernel version (run uname -a inside a container)?

@pditommaso
Copy link
Member

# uname -a 
Linux 380dfabbe99c 6.6.22-linuxkit #1 SMP Fri Mar 29 12:21:27 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove need for privileged permission for running Fusion file system
3 participants