Project

General

Profile

Feature #19920

Singularity wrapper failing when SINGULARITY_BIN does not contain the correct path

Added by Marco Mambelli about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
05/09/2018
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

The current GWMS script works only if SINGULARITY_BIN contains a correct path for singularity.
If not, it finds the path but fails to advertise it correctly, failing the execution.

For reference, the current segment in a OSG script (osgvo-node-advertise) looking for the Singularity path

    info "Checking for singularity..." 

    # set up the env to make sure Singularity uses the glidein dir for exported /tmp, /var/tmp
    if [ "x$GLIDEIN_Tmp_Dir" != "x" -a -e "$GLIDEIN_Tmp_Dir" ]; then
        export SINGULARITY_WORKDIR=$GLIDEIN_Tmp_Dir/adv-singularity-work.$$
    fi

    HAS_SINGULARITY="False" 
    export OSG_SINGULARITY_VERSION=`singularity --version 2>/dev/null`
    if [ "x$OSG_SINGULARITY_VERSION" != "x" ]; then
        HAS_SINGULARITY="True" 
        export OSG_SINGULARITY_PATH=`which singularity 2>/dev/null`
    else
        # some sites requires us to do a module load first - not sure if we always want to do that
        export OSG_SINGULARITY_VERSION=`module load singularity >/dev/null 2>&1; singularity --version 2>/dev/null`
        if [ "x$OSG_SINGULARITY_VERSION" != "x" ]; then
            HAS_SINGULARITY="True" 
            export OSG_SINGULARITY_PATH=`module load singularity >/dev/null 2>&1; which singularity`
        else
            info "Unable to find singularity in PATH=$PATH" 
        fi
    fi
    if [ "x$HAS_SINGULARITY" = "xTrue" ]; then
        # one last check - make sure we could determine the path to singularity
        if [ "x$OSG_SINGULARITY_PATH" = "x" ]; then
            my_warn "Looks like we found Singularity, but were unable to determine the full path to the executable" 
            HAS_SINGULARITY="False" 
        else
            info "Singularity binary appears present in $OSG_SINGULARITY_PATH and claims to be version $OSG_SINGULARITY_VERSION" 
        fi
    fi

History

#1 Updated by Marco Mambelli about 1 year ago

The latest OSG scripts are in: https://github.com/opensciencegrid/osg-flock

#2 Updated by Marco Mambelli about 1 year ago

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

Changes are in v34/19920

#3 Updated by Marco Mambelli about 1 year ago

  • Tracker changed from Bug to Feature

Changing it to feature. Even if there was already some code that seemed to search for the binary, it was not a supported/advertised capability

#4 Updated by Marco Mambelli about 1 year ago

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

Applied feedback adding notification when OSG OASIS module is used

#5 Updated by Marco Mambelli about 1 year ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF