Commit a5477283 authored by Andrea Sciaba's avatar Andrea Sciaba
Browse files

Moved to new singularity search algorithm

parent 5c0db4d8
......@@ -14,8 +14,8 @@ export SAME_CRITICAL=60
export SAME_MAINTENANCE=100
# setup grid client software
rhel6_img='/cvmfs/singularity.opensciencegrid.org/bbockelm/cms:rhel6'
rhel7_img='/cvmfs/singularity.opensciencegrid.org/bbockelm/cms:rhel7'
rhel6_img='/cvmfs/singularity.opensciencegrid.org/cmssw/cms:rhel6-m202001'
rhel7_img='/cvmfs/singularity.opensciencegrid.org/cmssw/cms:rhel7-m202001'
rhel6_client='/cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client/3.4/current/el6-x86_64/setup.sh'
rhel7_client='/cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client/3.4/current/el7-x86_64/setup.sh'
......
#!/bin/sh
# default image
export OSG_SINGULARITY_IMAGE_DEFAULT="/cvmfs/singularity.opensciencegrid.org/cmssw/cms:rhel6-m202001"
# Useful Information in case of a problem:
echo "System: `/bin/uname -a`"
echo "Current working directory: `/bin/pwd`"
......@@ -9,6 +12,8 @@ echo "SAME_SENSOR_HOME = ${SAME_SENSOR_HOME}"
echo "PATH = ${PATH}"
/bin/ls -l /cvmfs/cms.cern.ch/SITECONF/local || true
source ${SAME_SENSOR_HOME}/tests/singularity_lib.sh
echo "Unsetting SCRAM_ARCH..."
unset SCRAM_ARCH
......@@ -27,29 +32,8 @@ for LOCATION in \
fi
done
export PATH
HAS_SINGULARITY="True"
export OSG_SINGULARITY_VERSION=`singularity --version 2>/dev/null`
if [ "x$OSG_SINGULARITY_VERSION" != "x" ]; then
export OSG_SINGULARITY_PATH=`which singularity`
else
# some sites need us to do a module load first
export OSG_SINGULARITY_VERSION=`module load singularity >/dev/null 2>&1; singularity --version 2>/dev/null`
if [ "x$OSG_SINGULARITY_VERSION" != "x" ]; then
export OSG_SINGULARITY_PATH=`module load singularity >/dev/null 2>&1; which singularity`
else
HAS_SINGULARITY='False'
echo "WARNING: Could not find singularity on system"
fi
fi
# default image for this glidein
export OSG_SINGULARITY_IMAGE_DEFAULT="/cvmfs/singularity.opensciencegrid.org/bbockelm/cms:rhel6"
# for now, we will only advertise singularity on nodes which can access cvmfs
if [ ! -e "$OSG_SINGULARITY_IMAGE_DEFAULT" ]; then
HAS_SINGULARITY='False'
echo "WARNING: Could not find singularity image on system"
fi
singularity_locate_bin /usr/bin $OSG_SINGULARITY_IMAGE_DEFAULT
# Grid environment is taken from OSG, check it's available:
if [ ! -e /cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client ]; then
......@@ -62,8 +46,8 @@ if [ "$HAS_SINGULARITY" == "False" ] ; then
echo 'summary: SINGULARITY_NOT_FOUND'
exit $SAME_ERROR
else
echo "OSG_SINGULARITY_VERSION = ${OSG_SINGULARITY_VERSION}"
echo "OSG_SINGULARITY_PATH = ${OSG_SINGULARITY_PATH}"
echo "OSG_SINGULARITY_VERSION = ${GWMS_SINGULARITY_VERSION}"
echo "OSG_SINGULARITY_PATH = ${GWMS_SINGULARITY_PATH}"
fi
OSG_SINGULARITY_EXTRA_OPTS="--home ${SAME_SENSOR_HOME}:/srv --bind /cvmfs --contain"
......@@ -86,7 +70,7 @@ fi
export X509_USER_PROXY=/srv/proxy.pem
cd /cvmfs/singularity.opensciencegrid.org
$OSG_SINGULARITY_PATH exec $OSG_SINGULARITY_EXTRA_OPTS \
$GWMS_SINGULARITY_PATH exec $OSG_SINGULARITY_EXTRA_OPTS \
--pwd /srv \
--ipc --pid \
"$OSG_SINGULARITY_IMAGE_DEFAULT" \
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment