Paths in singularity are not substituted correctly when the execute directory has a link or bind mount
When in singularity outside paths have to be replaced w/ something existing (mounted) in Singularity.
The execution directory (home - start dir) is mounted as /srv
When its path is a hard link the substitution is failing:
DEBUG (/condor/execute/dir_167199/glide_iS6HFh/condor_job_wrapper.sh) /condor/execute/dir_167199/glide_iS6HFh/condor_job_wrapper.sh, in /export/data1/condor/execute/dir_167199/glide_iS6HFh/execute/dir_183277, list: total 1864
Here /condor/execute/dir_167199/ (used in the paths) is really /export/data1/condor/execute/dir_167199/ (returned by PWD, pwd, and realpath).
singularity_setup_inside() and singularity_update_path() use GWMS_SINGULARITY_OUTSIDE_PWD and robust_realpath "$GWMS_SINGULARITY_OUTSIDE_PWD".
When GWMS_SINGULARITY_OUTSIDE_PWD is already set as the real path (/export/data1/condor/execute/dir_167199/), then files referred with the link (/condor/execute/dir_167199) are not adjusted for the internal path.
I see 2 solutions:
1. fix GWMS_SINGULARITY_OUTSIDE_PWD to be the link, not the realpath
2. make a more robust check on both sides converting them both to the realpath (and paying attention on handling relative paths - should they become absolute?)
#4 Updated by Marco Mambelli 19 days ago
- Status changed from Accepted to Resolved
- Subject changed from Paths in singularity are not substituted correctly when the execute directory has an hard mount to Paths in singularity are not substituted correctly when the execute directory has a link or bind mount