Skip to content
Snippets Groups Projects
Commit 893841af authored by Fabrice Le Goff's avatar Fabrice Le Goff
Browse files

reorganized ProductionTools for installation of tools

parent 568d0b9d
No related branches found
No related tags found
No related merge requests found
Pipeline #3904906 passed
Showing
with 21 additions and 33 deletions
......@@ -107,7 +107,7 @@ while [ "x$LISTING_OUTPUT" != x ]; do
done
echo "Stopping CastorScript"
~/signal-script.sh 12
/sw/castor/tools/castor.signal 12
if [[ $COPY_ENABLED == True && $REMOTE_DIR == /eos/* ]]; then
echo "Contents of remote directory:"
......
#!/usr/bin/env bash
if [ -z $1 ]; then
echo "usage: $0 {test host}"
exit 1
fi
TESTHOST=$1
KEYTAB_FILE="/daq_area/castor/$TESTHOST/atlascdr/atlascdr.keytab"
if ! ssh $TESTHOST "sudo -u atlascdr -i cat $KEYTAB_FILE &>/dev/null"; then
echo "error: keytab file not readble by atlascdr ($KEYTAB_FILE)"
exit 3
else
echo "OK: readable keytab file: $KEYTAB_FILE"
fi
SOURCE_DIR=`pwd`/..
TOOLS_DIR=`pwd`/../../flegoff/castor_tools
echo "sending signal 12 to CastorScripts at $TESTHOST"
ssh $TESTHOST sudo -u atlascdr -i $TOOLS_DIR/signal-script.sh 12
#!/usr/bin/env bash
grep "taking to long" /atlas/logs/castor/pc-tdq-sfo-0?/CopyLog.out | awk -F':' '{print $2}' | sort | uniq -c
......@@ -6,11 +6,10 @@
for c in `cat castor.confs`; do
logdir=$(grep LogDir $c | awk '{print $NF}' | tr -d "'")
logdir=${logdir%/} # remove trailing slash
lsl=$(ls -l `echo "$logdir/*.out"` 2>/dev/null)
lsl=$(ls -l `echo "$logdir/*.log"` 2>/dev/null)
if [ $? -eq 0 ]; then
# Special case for ManagerLog.out which always contain 80/81 bytes
# because it outputs its thread ID even if logged are limited to >info
#echo "$lsl" | awk '/.*ManagerLog.out$/{if ($5 > 82) print $NF ": " $5} ! /.*ManagerLog.out$/ {if ($5 > 0) print $NF ": " $5}'
echo "$lsl" | awk '{if ($5 > 0) print $NF ": " $5}'
else
echo "No log files for $c: $logdir"
......
......@@ -14,7 +14,7 @@ fi
for conf in "$CASTOR_CONFS"; do
logdir=`grep LogDir $conf | awk '{print $NF}' | tr -d "'"`
for logfile in `find $logdir -maxdepth 1 -name '*.out'`; do #-maxdepth 1
for logfile in `find $logdir -maxdepth 1 -name '*.log.*'`; do #-maxdepth 1
grep "$TOGREP" $logfile
done
done
......
......@@ -26,7 +26,7 @@ for i in `seq -$(($NB_DAYS - 1)) 0`; do
for conf in "$CASTOR_CONFS"; do
logdir=`grep LogDir $conf | awk '{print $NF}' | tr -d "'"`
for logfile in `find $logdir -name '*.out'`; do #-maxdepth 1
for logfile in `find $logdir -name '*.log.*'`; do #-maxdepth 1
grep "$TOGREP" $logfile | grep -c $DATE
done
done | awk 'BEGIN {s=0} {s+=$1} END {print s}'
......
File moved
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://int8r/ATLAS_SFO_T0')
......
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0_R')
......
#!/sw/atlas/sw/lcg/releases/LCG_101/Python/3.9.6/x86_64-centos7-gcc11-opt/bin/python -i
import cx_Oracle
import coral_auth
user,pwd,dbn = coral_auth.get_connection_parameters_from_connection_string('oracle://atonr_conf/ATLAS_SFO_T0')
......
#!/bin/bash
pid=`ps -elf | grep Castor | grep python | grep -v grep | awk '{print \$4}'`
if [ "x$pid" == x ] ; then
echo "cannot send signal: castor script is not running"
exit -1
else
kill -s $1 $pid
fi
#!/usr/bin/env bash
for c in `cat castor.machines`; do
echo "$c"
ssh -x $c "~flegoff/castor_tools/signal-script.sh 12"
ssh -x $c "/sw/castor/tools/castor.signal 12"
done
......@@ -103,7 +103,8 @@ if not args.dryrun:
f'/mnt/daq_area_rw/castor/pc-tdq-sfo-{i}/atlascdr/prod.stopped')
if args.verbose: print(f'disabled CS on sfo-{i}')
if castorscript_is_running(f'pc-tdq-sfo-{i}', 'prod.cfg'):
stop_cs_cmd = ['ssh', '-x', f'pc-tdq-sfo-{i}', '~/signal-script.sh', '12']
stop_cs_cmd = ['ssh', '-x', f'pc-tdq-sfo-{i}',
'/sw/castor/tools/castor.signal', '12']
subprocess.run(stop_cs_cmd, check=True)
if args.verbose: print(f'sent stop signal to CS on sfo-{i}: waiting for CS to stop')
while castorscript_is_running(f'pc-tdq-sfo-{i}', 'prod.cfg'):
......
......@@ -32,6 +32,8 @@ fi
# DB disaster recovery are deployed as part of the CastorScript
mv ProductionTools/oracle_db_disaster_recovery . || err "cannot mv oracle_db_disaster_recovery"
# operation tools
mv ProductionTools/installed tools || err "cannot mv installed tools"
# remove from local directory what we don't want to be deployed
rm -rf Configs DeploymentTest ProductionTools UnitTests .git || err "cannot delete"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment