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

[Bug]: Files escape snap sandbox in /run and /var/spool #22

Open
NucciTheBoss opened this issue Jun 12, 2024 · 1 comment
Open

[Bug]: Files escape snap sandbox in /run and /var/spool #22

NucciTheBoss opened this issue Jun 12, 2024 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@NucciTheBoss
Copy link
Member

With further testing, I discovered that certain Slurm files are escaping the snap "sandbox". The sandbox technically doesn't exist since the Slurm snap is classically confined and not strictly confined, but to preserve the atomicity of the snap paths are directed to write data under snap-specific directories such as $SNAP_COMMON.

Unfortunately I noticed that supplying the --localstatedir and --runstatedir options to the Slurm configure script doesn't seem to do anything about this. Therefore, the easiest fix for this will be to preconfigure the SlurmctldPidFile and SlurmctldSpoolDir options when the Slurm snap is first installed via the install hook.

Should not start until #19 is fixed

@NucciTheBoss NucciTheBoss self-assigned this Jun 12, 2024
@NucciTheBoss NucciTheBoss added the bug Something isn't working label Jun 12, 2024
@NucciTheBoss NucciTheBoss changed the title Files escape snap sandbox in /run and /var/spool [Bug]: Files escape snap sandbox in /run and /var/spool Jun 25, 2024
@NucciTheBoss
Copy link
Member Author

Hmm... to be honest, I think this a documentation issue rather than a bug 🪳

Reason saying is that the Slurm snap actually works perfectly fine even if the files are outside of the snap sandbox/snapshottable directories. We just don't like that since mostly everything is under $SNAP_COMMON. I think rather than add additional complexity by sorta "preseeding" default values that we need to fight with when an admin goes to set new values, it would be better to just provide base configuration in a getting started howto that just has our preferred values.

Using the approach above, now if someone decides to change the defaults or ship their own configuration, they'll understand why some files are outside of $SNAP_COMMON. "Oh, this is outside $SNAP_COMMON because I set the SlurmdSpoolDir to a different location."

@NucciTheBoss NucciTheBoss added the documentation Improvements or additions to documentation label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant