Project

General

Profile

Feature #22285

Add a bind mount for /etc/hosts in Singularity

Added by Marco Mambelli about 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
04/04/2019
Due date:
% Done:

0%

Estimated time:
Stakeholders:

CMS

Duration:

Description

Here the request from Dirk:

There is a bug (feature?) in singularity that affects using the node /etc/hosts.
https://github.com/sylabs/singularity/issues/1707

Basically, if you pass --contain (which we do), the singularity container ignores the nodes /etc/hosts. This bites you in the behind if the nodes have host information in /etc/hosts that is not available in DNS. We run into this problem at TACC.
Could the wrapper be changed to include --bind /etc/hosts ?
Cheers
       Dirk

There is a mitigation for this: GlideinWMS provided script has also these 3 variables that can help here.
These can be set in the attributes section (<attrs>) of the Factory or Frontend:
GLIDEIN_SINGULARITY_BINDPATH_DEFAULT - to add a bind mounth in the Factory
GLIDEIN_SINGULARITY_BINDPATH - same in the Frontend
GLIDEIN_SINGULARITY_OPTS - Extra options for the singularity command

See http://glideinwms.fnal.gov/doc.prd/factory/custom_vars.html#singularity_vars for more info
E.g. Add in the TACC entry in the factory:
<attr const="True" glidein_publish="True" job_publish="True" name="GLIDEIN_SINGULARITY_BINDPATH_DEFAULT" parameter="True" publish="True" type="string" value="/etc/hosts" />

Note also that Dave pointed out to me that older 3.x versions of Singularity were failing it the same destination is mounted twice (this is just a warning in 2.x and 3.1.1).


Related issues

Related to glideinWMS - Feature #22334: Add a bind mount for /etc/localtime in SingularityClosed2019-04-08

History

#1 Updated by Marco Mambelli about 2 months ago

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

Changes are in v34/22285

#2 Updated by Marco Mambelli about 2 months ago

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

#3 Updated by Marco Mambelli about 2 months ago

  • Status changed from Resolved to Closed

#4 Updated by Marco Mambelli about 1 month ago

  • Related to Feature #22334: Add a bind mount for /etc/localtime in Singularity added


Also available in: Atom PDF