Project

General

Profile

Feature #22875

Advertise if a Glidein can use privileged or unprivileged Singularity

Added by Marco Mambelli 3 months ago. Updated 23 days ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Start date:
07/09/2019
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

The Glidein is advertising if it can use Singularity: if the VO (Frontend/group) is OK, if the Factory/entry are OK, if the binary and default image are available and additional tests passed.
This is advertised with the HAS_SINGULARITY attribute (NOTE: HTCondor uses the different HASSINGULARITY, no underscore).
The tests should check also if Singularity is used in privileged or unprivileged mode and advertise that.

History

#1 Updated by Marco Mambelli 2 months ago

  • Target version changed from v3_5_1 to v3_4_7

SINGULARITY_AVAILABLE {NO, PRIVILEGED, UNPRIVILEGED}

This is testing for singularity in singularity_lib

function singularity_is_inside {
    # Return true (0) if in Singularity false (1) otherwise
    # In Singularity SINGULARITY_NAME and SINGULARITY_CONTAINER are defined
    # In the default GWMS wrapper GWMS_SINGULARITY_REEXEC=1
    # The process 1 in singularity is called init-shim (v>=2.6), not init
    # If the parent is 1 and is not init (very likely - on most Unix 1 is init)
    [[ -n "$SINGULARITY_NAME" ]] && { true; return; }
    [[ -n "$GWMS_SINGULARITY_REEXEC" ]] && { true; return; }
    [[ "x`ps -p1 -ocomm=`" = "xshim-init" ]] && { true; return; }
    [[ "x$PPID" = x1 ]] && [[ "x`ps -p1 -ocomm=`" != "xinit" ]] && { true; return; }
    false
    return
}

#2 Updated by Marco Mambelli about 2 months ago

  • Assignee changed from Marco Mambelli to Dennis Box
  • Status changed from New to Feedback

Changes are in branch v34/22875
Includes code style improvements. Major rewrite and simplification of singularity_locate_bin()

#3 Updated by Dennis Box about 2 months ago

  • Assignee changed from Dennis Box to Marco Mambelli

#4 Updated by Dennis Box about 2 months ago

feedback sent

#5 Updated by Marco Mambelli about 2 months ago

  • Status changed from Feedback to Resolved

#6 Updated by Marco Mambelli about 1 month ago

  • Target version changed from v3_4_7 to v3_5_1

#7 Updated by Marco Mambelli 23 days ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF