-
Notifications
You must be signed in to change notification settings - Fork 98
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
singularity build --oci fails when $HOME/.singularity/singularity-buildkitd is on NFS #3382
Comments
Hmmm - yes, its unfortunate this happens due to lack of subuid support on the NFS filesystem. There isn't a way to configure the path for We could perhaps look at how podman has an option (to address the same underlying issue), that allows a path incorporating $HOME/$UID/$USER |
Thanks for the explanation. I would surmise that even if NFS (or other network filesystem) could support subuids, it might be unreliable to run concurrent instances of singularity-buildkitd on different nodes?
Perhaps podman's support for using |
I think using We'll try and address the general buildkitd issue via a configuration option / env-var / flag when time allows. Proper XDG directory support may be something for the next major version. |
@nathanweeks - we have some code elsewhere to detect filesystems that aren't suitable for some purposes and direct things to Any thoughts? |
Uncached builds are better than no builds, and it's usually safe to assume $TMPDIR is local. A few minor questions:
|
I suppose $TMPDIR refers to SINGULARITY_TMPDIR > TMPDIR > /tmp for temporary folders? |
Definitely - I would add a warning.
Yes, we can do the same check on $TMPDIR as for the default buildkit directory location.
As you note elsewhere, $SINGULARITY_TMPDIR > $TMPDIR > /tmp |
@nathanweeks - I've had a go at this today, and the fallback to a tempDir works. The challenge is getting cleanup to fire reliably and correctly in all circumstances given how things are split across a buildkit daemon and the singularity binary, and partly due to how the buildkit daemon starts up / exits. Will get there... but this is probably going to be something I have to come back to in the near future due to some other work. |
The PR at #3407 is the 'proof-of-concept' for a fallback... without the work done on rewriting the startup / exit handling for singularity-buildkitd yet. Might yet be the case that the TMPDIR handling moves into the client if that's easier, but I'd like to keep it in the daemon if possible. Will probably get a bit more time on this toward the end of next week. |
Before you report an issue...
Version of Singularity
What version of Singularity are you using? Run:
singularity-ce version 4.2.1-1
Describe the bug
singularity build --oci
fails with afailed to Lchown... operation not permitted
error when .singularity/singularity-buildkitd (or more specifically, ~/.singularity/singularity-buildkitd/runc-overlayfs) is on an NFS file system (a common scenario for user home directories on an HPC cluster).To Reproduce
Expected behavior
I expect the build to succeed
OS / Linux Distribution
Which Linux distribution are you using? Is it up-to-date?
Rocky Linux 8.9
Installation Method
Singularity 4.2.1 was installed via RPM from https://github.com/sylabs/singularity/releases/tag/v4.2.1
Additional context
Symlinking ~/.singularity/singularity-buildkit to a node-local storage path (or more specifically, ~/.singularity/singularity-buildkit/runc-overlayfs) to a node-local storage path works around the error, and allows
singularity build --oci
to succeed.Requiring the users to manually create a symlink to node-local storage isn't very user-friendly (especially if the target node-local directory path needs to be created manually as well). Is there a way to configure just the ~/.singularity/singularity-buildkit path (e.g., environment variable or config file)?
I'm aware of the SINGULARITY_CONFIGDIR environment variable (which isn't documented in the SingularityCE 4.2 User Guide, though it should be?), but that sets the path of the .singularity directory, which is not the intention in this case (e.g., it contains other state the user probably doesn't want on ephemeral/node-local storage).
Alternatively, if the contents of ~/.singularity/singularity-buildkitd instead went to the same directory as the
singularity-buildkitd-<pid>.sock
file (or perhaps just the runc-overlayfs subdirectory, if that wouldn't break anything?), that would seem to resolve the issue as well.The text was updated successfully, but these errors were encountered: