-
Notifications
You must be signed in to change notification settings - Fork 427
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
sandbox directory cannot be removed if original container has non-writeable directories #4517
Comments
I believe the removal failure could be because of the unpack failure; if it is like another docker unpacker I looked at lately, it fixes up permissions after successful completion. To workaround the removal you can do I see different error messages when building both centos:7 and centos:6, with version 3.4.0-1.2 and 3.4.1-1.1. This is what I see when building with privileged singularity:
and this is what I see with the -u option:
I don't understand how nobody caught this before now since this is a pretty common task. I know I have been building sandboxes in the last month. @cclerget @dctrud can you take a look? |
Thanks @DrDaveD, I don't want to use workarounds it makes progressively more fragile. Already I had to rename the default I/O directory because of this in 3.2.1 issue https://github.com/sylabs/singularity/issues/4498 now I have also to go around this. Note that already building the sandbox is an attempt to fix this sylabs/singularity#2588 and which is also a problem for others https://github.com/sylabs/singularity/issues/3886 and were never really replied. |
This problem is impacting us (unpacked.cern.ch) as well. We are not able to delete images that are created from a docker container, which is quite problematic. |
I can confirm with the
I'm going to guess something is going on here with the |
@dctrud as written in the ticket if the cache is not disabled it doesn't even create the image,
same goes using -u fails with another error
so the new title doesn't reflect the whole story and may lead you to fix only 1 of what look like 3 problem(s). Unless you think they all have the same root cause. thanks |
Hi @afortiorama - the caching issue is a separate thing, which neither @DrDaveD or we are replicating yet. It's noted, but we're concentrating on the sandbox permission problem first, which we can replicate with caching enabled. I'll split the caching thing into a new issue in a bit. |
PR #4522 should return the non-root OCI/docker origin sandboxes to the previous state from <3.4.0. Any 👀 on it much appreciated. |
I swore I tested this... and looking back I had... but in VMs where I was building a sandbox on the same device as where The regression test being added to the PR is looking at actual permissions on files in the container, in order to not be affected by this inter vs intra-device move causing success/failure. |
In order to try to separate this into the different problem being reported, this part:
is because of this typo:
note it says "SINGULAIRTY_TMPDIR" instead of "SINGULARITY_TMPDIR". Because of that the cache directory is being set to
note this is the original issue as reported. |
Then there's a second different issue:
it seems even a non-existent but writeable cache directory will cause this error. |
The third issue is that once the cache is set to something that does exist, as in the last command in the previous command, the resulting sandbox cannot be deleted:
Examining these files:
the file itself is OK, but the directory containing it does not have write permissions. This is fixed by:
|
@mem - not quite... your third issue isn't quite the same as reported in the thread above - there's a build failure that can happen from the same cause. This is becoming very confusing to track, so I'm going to close this issue, and open multiple new ones which are more granular right now. |
@dctrud I think the difference is I'm looking at master, not 3.4. I believe a change was added in master that's effectively fixing the build failure. This problem seems specific to 3.4 right now. |
Same problem with |
Version of Singularity:
singularity-3.4.0-1.2.el7.x86_64
Expected behavior
singularity -s build --sandbox /home/aforti/docker_centos_7/image docker://centos:7
Expect like in 3.2.1 or even 2.6.1 singularity to build the sandbox with the paermission of the callers
Actual behavior
if I leave the cache eanbled the command fails with
if I disable the cache it returns some warnings and then it builds the sandbox with root permissions whether the user napmesspaces is enabled or not.
warnings
permissions that do not allow to delete the sandbox
Steps to reproduce this behavior
with the cache
without the cache
What OS/distro are you running
How did you install Singularity
rpm from EPEL repository
The text was updated successfully, but these errors were encountered: