Skip to content

Commit

Permalink
merge in 1.10 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphall committed Oct 29, 2024
2 parents ba73a63 + 323dacb commit 5655143
Show file tree
Hide file tree
Showing 68 changed files with 1,716 additions and 5,199 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ c863fa5b076fb2476578b616138169308870d392
c824457ea92c8a0154f93c3bafdda94bf002350d
ba7c58073ad9cbb7a2c0c508e7a71839f32af8e9
5b854789e615b4e22e354389d117a5234c17aac3
b0c0bf5de3b518ddfeebd8fa62e0767fe9ea05e4
2 changes: 1 addition & 1 deletion job-wrappers/itb-default_singularity_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ download_or_build_singularity_image () {
base_name=$(echo $singularity_image | sed 's;/cvmfs/singularity.opensciencegrid.org/;;' | sed 's;/*/$;;')
image_name=$(echo "$base_name" | sed 's;[:/];__;g')
week=$(date +'%V')
singularity_srcs="stash:///osgconnect/public/rynge/infrastructure/images/$week/sif/$image_name.sif https://data.isi.edu/osg/images/$image_name.sif docker://hub.opensciencegrid.org/$base_name"
singularity_srcs="osdf:///ospool/uc-shared/public/OSG-Staff/images/$week/sif/$image_name.sif http://ospool-images.osgprod.tempest.chtc.io/$week/sif/$image_name.sif docker://hub.opensciencegrid.org/$base_name"
elif [[ -e "$singularity_image" ]]; then
# the image is not on cvmfs, but has already been downloaded - short circuit here
echo "$singularity_image"
Expand Down
44 changes: 0 additions & 44 deletions node-check/clock-check

This file was deleted.

80 changes: 0 additions & 80 deletions node-check/crl-check

This file was deleted.

3 changes: 0 additions & 3 deletions node-check/frame_files_small.txt

This file was deleted.

2 changes: 1 addition & 1 deletion node-check/igwn-additional-htcondor-config
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ condor_vars_file=`grep -i "^CONDOR_VARS_FILE " $glidein_config | awk '{print $2}
# stashcp
STASHCP=$PWD/client/stashcp
STASHCP_DEBUG="-d"
STASHCP_TEST_FILE="/osgconnect/public/dweitzel/stashcp/test.file"
STASHCP_TEST_FILE="/ospool/uc-shared/public/OSG-Staff/validation/test.txt"
STASH_PLUGIN=$PWD/client/stash_plugin
chmod 755 $STASHCP $STASH_PLUGIN

Expand Down
3 changes: 3 additions & 0 deletions node-check/ligo-cvmfs-data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HAS_CVMFS_LIGO_OSGSTORAGE /cvmfs/oasis.opensciencegrid.org/ligo/frames/O2/hoft/H1/H-H1_HOFT_C00-11650/H-H1_HOFT_C00-1165000704-1884.gwf
HAS_CVMFS_LIGO_STORAGE /cvmfs/ligo.storage.igwn.org/igwn/ligo/frames/O4/hoft_C00/H1/H-H1_HOFT_C00-137/H-H1_HOFT_C00-1373810688-4096.gwf
HAS_CVMFS_VIRGO_STORAGE /cvmfs/virgo.storage.igwn.org/igwn/virgo/frames/O4/HoftOnline/V-HoftOnline-13738/V-HoftOnline-1373814000-2000.gwf
102 changes: 29 additions & 73 deletions node-check/ligo-cvmfs-storage-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

glidein_config="$1"


function info {
echo "INFO " $@ 1>&2
}
Expand All @@ -18,12 +17,11 @@ function warn {
}

function advertise {
# atype is the type of the value as defined by GlideinWMS:
# I - integer
# S - quoted string
# C - unquoted string (i.e. Condor keyword or expression)


# atype is the type of the value as defined by GlideinWMS:
# I - integer
# S - quoted string
# C - unquoted string (i.e. Condor keyword or expression)

key="$1"
value="$2"
atype="$3"
Expand All @@ -40,90 +38,48 @@ function advertise {
fi
}

function get_glidein_config_value {
# extracts a config attribute value from
# $1 is the attribute key
CF=$glidein_config
if [ "$glidein_config" = "NONE" ]; then
CF="$PWD/glidein_config"
fi
KEY="$1"
VALUE=`(cat $CF | grep "^$KEY " | tail -n 1 | sed "s/^$KEY //") 2>/dev/null`
echo "$VALUE"
}

if [ "x$glidein_config" = "x" ]; then
glidein_config="NONE"
info "No arguments provided - assuming HTCondor startd cron mode"
else
info "Arguments to the script: $@"
fi

info "This is a setup script for the IGWN frontend."
info "In case of problems, contact Edgar Fajardo ([email protected])"

if [ "$glidein_config" != "NONE" ]; then
###########################################################
# import advertise and add_condor_vars_line functions
add_config_line_source=`grep '^ADD_CONFIG_LINE_SOURCE ' $glidein_config | awk '{print $2}'`
source $add_config_line_source

condor_vars_file=`grep -i "^CONDOR_VARS_FILE " $glidein_config | awk '{print $2}'`
fi

##################

info "Checking for IGWN container availability"
info "Checking for IGWN FRAMES availability..."
info "Current X509_USER_PROXY=${X509_USER_PROXY}"

FS_ATTR="HAS_CVMFS_LIGO_CONTAINERS"
RESULT="False"
if [ -s /cvmfs/singularity.opensciencegrid.org/lscsoft/bayeswave:latest ]; then
RESULT="True"
fi
advertise $FS_ATTR "$RESULT" "C"
advertise "HAS_CVMFS_IGWN_CONTAINERS" "$RESULT" "C"


info "Checking for IGWN FRAMES availability"

HAS_SINGULARITY=`get_glidein_config_value HAS_SINGULARITY`
FS=ligo.osgstorage.org
FS_ATTR="HAS_LIGO_FRAMES"
RESULT="False"
TEST_FILE=`shuf -n 1 client/frame_files_small.txt`
OSG_SINGULARITY_PATH=`get_glidein_config_value OSG_SINGULARITY_PATH`
OSG_SINGULARITY_EXTRA_OPTS=`get_glidein_config_value OSG_SINGULARITY_EXTRA_OPTS`
OSG_SINGULARITY_IMAGE_DEFAULT=`get_glidein_config_value OSG_SINGULARITY_IMAGE_DEFAULT`
TEST_CMD="head -c 1k $TEST_FILE"

if [ "x$HAS_SINGULARITY" = "xTrue" ]; then
info "Testing LIGO frames inside singularity"
info "Making copy of $X509_USER_PROXY"
cp $X509_USER_PROXY $PWD/frames_test_proxy
chmod 600 $PWD/frames_test_proxy
info "export SINGULARITYENV_X509_USER_PROXY=/srv/frames_test_proxy;setsid $OSG_SINGULARITY_PATH exec --bind $PWD:/srv $OSG_SINGULARITY_EXTRA_OPTS $OSG_SINGULARITY_IMAGE_DEFAULT $TEST_CMD | grep Frame"
if ! (export SINGULARITYENV_X509_USER_PROXY=/srv/frames_test_proxy;setsid $OSG_SINGULARITY_PATH exec --bind $PWD:/srv \
$OSG_SINGULARITY_EXTRA_OPTS \
"$OSG_SINGULARITY_IMAGE_DEFAULT" \
$TEST_CMD \
| grep Frame) 1>&2 \
; then
FS_ATTR="HAS_IGWN_FRAMES"
TEST_FILE_LIST="client/ligo-cvmfs-data.txt"

# test all GWF files in the file
OVERALL_RESULT="True" # start with success and assert otherwise
while read CVMFS_ATTR GWF \
; do
TEST_CMD="head -c4 $GWF"
if ! (setsid $TEST_CMD | grep IGWD) 1>&2; then
RESULT="False"
OVERALL_RESULT="${RESULT}"
warn "Could not read $GWF"
else
RESULT="True"
info "Successfully read $GWF"
fi
advertise "HAS_CVMFS_IGWN_PRIVATE_DATA_SINGULARITY" "$RESULT" "C"
fi
info "Testing LIGO frames outside singularity"
info "setsid $TEST_CMD | grep Frame"
if ! (setsid $TEST_CMD | grep Frame) 1>&2 \
; then
RESULT="False"
else
RESULT="True"
fi
advertise $FS_ATTR "$RESULT" "C"
advertise "HAS_CVMFS_IGWN_PRIVATE_DATA" "$RESULT" "C"
advertise "HAS_CVMFS_LIGO_STORAGE" "$RESULT" "C"
advertise "HAS_CVMFS_IGWN_STORAGE" "$RESULT" "C"
##################
info "All done - time to do some real work!"
advertise "${CVMFS_ATTR}" "${RESULT}" "C"
done <${TEST_FILE_LIST}

advertise $FS_ATTR "$OVERALL_RESULT" "C"
advertise "HAS_LIGO_FRAMES" "$OVERALL_RESULT" "C"
advertise "HAS_CVMFS_IGWN_PRIVATE_DATA" "$OVERALL_RESULT" "C"
advertise "HAS_CVMFS_IGWN_STORAGE" "$OVERALL_RESULT" "C"

info "Done."
Loading

0 comments on commit 5655143

Please sign in to comment.