Project

General

Profile

Bug #25038

Paths in singularity are not substituted correctly when the execute directory has a link or bind mount

Added by Marco Mambelli 24 days ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Category:
Glidein
Target version:
Start date:
09/30/2020
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:

CMS

Duration:

Description

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?)

History

#1 Updated by Marco Mambelli 23 days ago

  • Assignee changed from Marco Mambelli to Marco Mascheroni
  • Status changed from New to Feedback

Changes in v36/25038
Only the factory changes (singularity_lib.sh) should be sufficient to fix the problem

#2 Updated by Marco Mascheroni 19 days ago

  • Assignee changed from Marco Mascheroni to Marco Mambelli
  • Status changed from Feedback to Accepted

#3 Updated by Marco Mascheroni 19 days ago

LGTM, just remove the trailing whitespaces.

#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

#5 Updated by Marco Mambelli 19 days ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF