Skip to content
Snippets Groups Projects
Commit 7cf50bd5 authored by Steven Murray's avatar Steven Murray
Browse files

Removed the use of the MGM TapeAwareGc from the CI

parent 4ae7bb8e
Branches
Tags
No related merge requests found
......@@ -69,6 +69,3 @@ mgmofs.autosaveconfig true
# Set the endpoint and resources for EOS/CTA Workflows
mgmofs.protowfendpoint ctafrontend:10955
mgmofs.protowfresource /ctafrontend
# Turn on the MGM LRU tape aware garbage collector
mgmofs.tapeawaregc.defaultspace.enable true
......@@ -265,100 +265,10 @@ fi
# prepare EOS garbage collectors
# enable the 'file archived' garbage collector
eos space config default space.filearchivedgc=on
# set the number of free bytes at which the MGM LRU tape aware garabge collector will start deleting redundant disk files
eos space config default space.tapeawaregc.minfreebytes=0
# configure preprod directory separately
/opt/run/bin/eos_configure_preprod.sh
SPACE_QUERY_PERIOD_SECS=10
if sudo eos space config default space.tapeawaregc.spacequeryperiodsecs=${SPACE_QUERY_PERIOD_SECS}; then
echo "Set default space.tapeawaregc.spacequeryperiodsecs to ${SPACE_QUERY_PERIOD_SECS}"
else
echo "Failed to set default space.tapeawaregc.spacequeryperiodsecs to ${SPACE_QUERY_PERIOD_SECS}"
exit 1
fi
FREE_BYTES_DEFAULT_FS_RW=0
FREE_BYTES_TIMEOUT_SECS=60
FREE_BYTES_WAIT_SECS=0
while true; do
FREE_BYTES_DEFAULT_FS_RW=`sudo eos ns stat | grep ' tgc freebytes default ' | awk '{print $NF;}'`
echo `date`" FREE_BYTES_DEFAULT_FS_RW=${FREE_BYTES_DEFAULT_FS_RW}"
if test ${FREE_BYTES_DEFAULT_FS_RW} -gt 0; then
break;
fi
sleep 1
let FREE_BYTES_WAIT_SECS=FREE_BYTES_WAIT_SECS+1
if test ${FREE_BYTES_WAIT_SECS} -ge ${FREE_BYTES_TIMEOUT_SECS}; then
echo "Timed out waiting for 'tgc freebytes default' to be greater than 0"
exit 1
fi
done
EOS_FS_1=`sudo eos fs ls -m | grep ' id=1 '`
if test x != "x${EOS_FS_1}"; then
echo "Found EOS file system with ID 1"
else
echo "Could not find EOS file system with ID 1"
exit 1
fi
if echo ${EOS_FS_1} | grep ' configstatus=rw '; then
echo "The config status of EOS file system with ID 1 is 'rw'"
else
echo "The config status of EOS file system with ID 1 is not 'rw'"
exit 1
fi
if sudo eos fs config 1 configstatus=off; then
echo "Configured EOS file system with ID 1 to be 'off'"
else
echo "Failed to configure EOS file system with ID 1 to be 'off'"
exit 1
fi
FREE_BYTES_DEFAULT_FS_OFF=0
FREE_BYTES_TIMEOUT_SECS=60
FREE_BYTES_WAIT_SECS=0
while true; do
FREE_BYTES_DEFAULT_FS_OFF=`sudo eos ns stat | grep ' tgc freebytes default ' | awk '{print $NF;}'`
echo `date`" FREE_BYTES_DEFAULT_FS_OFF=${FREE_BYTES_DEFAULT_FS_OFF}"
if test ${FREE_BYTES_DEFAULT_FS_OFF} -lt ${FREE_BYTES_DEFAULT_FS_RW}; then
break
fi
sleep 1
let FREE_BYTES_WAIT_SECS=FREE_BYTES_WAIT_SECS+1
if test ${FREE_BYTES_WAIT_SECS} -ge ${FREE_BYTES_TIMEOUT_SECS}; then
echo "Timed out waiting for 'tgc freebytes default' to be less than ${FREE_BYTES_DEFAULT_FS_RW}"
exit 1
fi
done
if sudo eos fs config 1 configstatus=rw; then
echo "Configured EOS file system with ID 1 to be 'rw'"
else
echo "Failed to configure EOS file system with ID 1 to be 'rw'"
exit 1
fi
FREE_BYTES_DEFAULT_FS_RW=0
FREE_BYTES_TIMEOUT_SECS=60
FREE_BYTES_WAIT_SECS=0
while true; do
FREE_BYTES_DEFAULT_FS_RW=`sudo eos ns stat | grep ' tgc freebytes default ' | awk '{print $NF;}'`
echo `date`" FREE_BYTES_DEFAULT_FS_RW=${FREE_BYTES_DEFAULT_FS_RW}"
if test ${FREE_BYTES_DEFAULT_FS_RW} -gt ${FREE_BYTES_DEFAULT_FS_OFF}; then
break;
fi
sleep 1
let FREE_BYTES_WAIT_SECS=FREE_BYTES_WAIT_SECS+1
if test ${FREE_BYTES_WAIT_SECS} -ge ${FREE_BYTES_TIMEOUT_SECS}; then
echo "Timed out waiting for 'tgc freebytes default' to be greater than ${FREE_BYTES_DEFAULT_FS_OFF}"
exit 1
fi
done
touch /EOSOK
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
......@@ -368,8 +278,3 @@ else
yum install -y systemd-resolved
systemctl start systemd-resolved
fi
if ! sudo eos ns stat | grep ' tgc freebytes default '; then
echo "Could not find 'tgc freebytes default' in the output of 'eos ns stat'"
exit 1
fi
......@@ -23,7 +23,6 @@ TAPEAWAREGC=0
NB_BATCH_PROCS=500 # number of parallel batch processes
BATCH_SIZE=20 # number of files per batch process
GC_MINFREEBYTES=2000000000000000000 # value for space.tapeawaregc.minfreebytes initially (for default space). Set if TAPEAWAREGC=1
SSH_OPTIONS='-o BatchMode=yes -o ConnectTimeout=10'
......@@ -126,13 +125,7 @@ fi
if [[ $TAPEAWAREGC == 1 ]]; then
echo "Enabling tape aware garbage collector"
ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.tapeawaregc.minfreebytes=${GC_MINFREEBYTES} || die "Could not set space.tapeawaregc.minfreebytes to ${GC_MINFREEBYTES}"
ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.filearchivedgc=off || die "Could not disable filearchivedgc"
else
echo "Enabling file archived garbage collector"
# no ssh for CI
#ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.tapeawaregc.minfreebytes=0 || die "Could not set space.tapeawaregc.minfreebytes to 0"
#ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.filearchivedgc=on || die "Could not enable filearchivedgc"
fi
EOS_DIR=''
......@@ -257,14 +250,6 @@ sleep 10
echo "###"
if [[ $TAPEAWAREGC == 1 ]]; then
echo "Disabling file tape aware garbage collector"
ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.tapeawaregc.minfreebytes=0 || die "Could not set space.tapeawaregc.minfreebytes to 0"
# we do not need it for retrieves
# ssh ${SSH_OPTIONS} -l root ${EOSINSTANCE} eos space config default space.filearchivedgc=on || die "Could not enable filearchivedgc"
fi
echo "$(date +%s): Trigerring EOS retrieve workflow as poweruser1:powerusers (12001:1200)"
rm -f ${STATUS_FILE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment