v3.1.0-rc2
Trying to bind-mount a nonexisting path should fail; it did in 2.x:
# singularity shell -B /does/not/exist:/mnt ubuntu.simg
ERROR : There was an error binding the path /does/not/exist: No such file or directory
ABORT : Retval = 255
Singularity starts instead of aborting. Warnings are produced, but inconsistently.
If the destination path exists within the container, no warning is printed at all:
$ singularity shell -B /does/not/exist:/mnt docker://ubuntu
Singularity ubuntu_latest.sif:~>
If the destination path requires an overlay, there's a warning but the container starts:
$ singularity shell -B /does/not/exist:/this/doesnt/either docker://ubuntu
WARNING: skipping mount of /does/not/exist: no such file or directory
Singularity ubuntu_latest.sif:~>
I'm not sure if the 2.x fatal error being changed into a 3.x warning in second example is the intended new behavior - can't find it in the documentation, built-in help or changelog.
But at a bare minimum the warning should always be printed.
@vsoch @kav2k I believe we've now fixed this. I will close this issue, feel free to re-open if we need to revisit still.
I think I'd like to revisit Windy Hill one day, but I'm okay with just one trip to GitHub issues that are since closed.
@bauerm97 @vsoch Apologies for a late response; I would like to know in which sense this is fixed.
Suppose you want to say "warning is the new OK instead of failing" (still not in the changelog for 3.x). The behavior is still inconsistent:
Reproducing with current master:
user@host:~$ singularity shell -B /does/not/exist:/this/doesnt/either docker://ubuntu
WARNING: skipping mount of /does/not/exist: no such file or directory
Singularity ubuntu_latest.sif:~> exit
user@host:~$ singularity shell -B /does/not/exist:/mnt docker://ubuntu
Singularity ubuntu_latest.sif:~> exit
user@host:~$ singularity --version
singularity version 3.1.0-314.gfc944fc17
There is still no warning to the user whatsoever when the bind location inside the container exists, but the host path does not.
The first fix that I did isn鈥檛 for a directory not existing, it鈥檚 for a directory that has been specified more than one time as a bind mount. As far as I know, the issue that you mention here is still an issue.
Then perhaps a wrong bug was closed here.
Agreed, apologies for that, I didn鈥檛 look closely enough!