From 4a4d262c2178acd127c0627542910423b904433f Mon Sep 17 00:00:00 2001 From: Fabrice Le Goff <fabrice.le.goff@cern.ch> Date: Wed, 7 Aug 2024 12:15:39 +0200 Subject: [PATCH] changed references from flegoff to vandelli --- DeploymentTest/readme | 29 ----------- DeploymentTest/test_config.cfg | 2 +- DeploymentTest/test_config_is_ers.cfg | 2 +- DeploymentTest/test_config_is_ers_mig.cfg | 2 +- DeploymentTest/test_config_localreader.cfg | 4 +- .../test_config_localreader_is_ers.cfg | 4 +- DeploymentTest/test_config_mig.cfg | 2 +- readme | 19 ------- readme.md | 51 +++++++++++++++++++ watchdog.sh | 6 +-- 10 files changed, 62 insertions(+), 59 deletions(-) delete mode 100644 DeploymentTest/readme delete mode 100644 readme create mode 100644 readme.md diff --git a/DeploymentTest/readme b/DeploymentTest/readme deleted file mode 100644 index beb9218..0000000 --- a/DeploymentTest/readme +++ /dev/null @@ -1,29 +0,0 @@ -Point 1 Tests -------------- -Select an unassigned calibration machine (for example): - https://atlasop.cern.ch/twiki/bin/view/Main/CalibrationFarm -Log in to P1 -git clone https://:@gitlab.cern.ch:8443/atlas-tdaq-software/CastorScript.git -cd CastorScript/DeploymentTest -./p1.test.user.bash pc-tdq-calib-XX - -If you need to have an modified authorization file: - source /sw/castor/script_setup.sh - export CORAL_AUTH_PATH="$CORAL_AUTH_PATH:/path/to/CastorScript/coral/" - python -u ../Script/CastorScript.py xxx.cfg - -Testing a new watchdog / Running a non-installed version --------------------------------------------------------- -If the parameter "TEST" is provided to the watchdog it runs version from: -"/atlas-home/1/flegoff/CastorScript" instead of "/sw/castor/" -and look for "*.testcfg" configuration files instead of "*.cfg" - -To test a new version on a production config: change the config file extension, -kill the running instance, and setup a task in atlascdr's crontab on HOST: - mv /mnt/daq_area_rw/castor/HOST/atlascdr/xxx.cfg \ - /mnt/daq_area_rw/castor/HOST/atlascdr/xxx.testcfg - ssh -x HOST /sw/castor/tools/castor.signal 12 - ssh HOST - crontab -e - MAILTO="flegoff@cern.ch" - */5 * * * * /atlas-home/1/flegoff/CastorScript/watchdog.sh TEST >> /logs/castor_watchdog_test.log 2>&1 diff --git a/DeploymentTest/test_config.cfg b/DeploymentTest/test_config.cfg index aaa11fc..da97012 100644 --- a/DeploymentTest/test_config.cfg +++ b/DeploymentTest/test_config.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' diff --git a/DeploymentTest/test_config_is_ers.cfg b/DeploymentTest/test_config_is_ers.cfg index db8d0e7..ccd7ae6 100644 --- a/DeploymentTest/test_config_is_ers.cfg +++ b/DeploymentTest/test_config_is_ers.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' diff --git a/DeploymentTest/test_config_is_ers_mig.cfg b/DeploymentTest/test_config_is_ers_mig.cfg index 597a048..20fe6fe 100644 --- a/DeploymentTest/test_config_is_ers_mig.cfg +++ b/DeploymentTest/test_config_is_ers_mig.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' diff --git a/DeploymentTest/test_config_localreader.cfg b/DeploymentTest/test_config_localreader.cfg index 903b571..9374c56 100644 --- a/DeploymentTest/test_config_localreader.cfg +++ b/DeploymentTest/test_config_localreader.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' @@ -8,7 +8,7 @@ MainThreadEventTimeout: 2 FilenameParser: 'TestFileNameParser' BackendModule: 'localreader' -BackendModuleConf: {'READ_SCRIPT': '/atlas-home/1/flegoff/CastorScript/Script/cs/StorageBackends/read_script.sh'} +BackendModuleConf: {'READ_SCRIPT': '/atlas-home/1/vandelli/CastorScript/Script/cs/StorageBackends/read_script.sh'} SrcDirs: ['/tmp/atlascdr/'] DataFilePattern: ['*.data',] diff --git a/DeploymentTest/test_config_localreader_is_ers.cfg b/DeploymentTest/test_config_localreader_is_ers.cfg index 2efc189..dcb886b 100644 --- a/DeploymentTest/test_config_localreader_is_ers.cfg +++ b/DeploymentTest/test_config_localreader_is_ers.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' @@ -24,7 +24,7 @@ MainThreadEventTimeout: 2 FilenameParser: 'TestFileNameParser' BackendModule: 'localreader' -BackendModuleConf: {'READ_SCRIPT': '/atlas-home/1/flegoff/CastorScript/Script/cs/StorageBackends/read_script.sh'} +BackendModuleConf: {'READ_SCRIPT': '/atlas-home/1/vandelli/CastorScript/Script/cs/StorageBackends/read_script.sh'} SrcDirs: ['/tmp/atlascdr/'] DataFilePattern: ['*.data',] diff --git a/DeploymentTest/test_config_mig.cfg b/DeploymentTest/test_config_mig.cfg index aad2143..a62c2d0 100644 --- a/DeploymentTest/test_config_mig.cfg +++ b/DeploymentTest/test_config_mig.cfg @@ -1,6 +1,6 @@ LogDir: '/tmp/atlascdr/logs/' LogLevel: 'debug' -EmailLogList: ['flegoff@cern.ch'] +EmailLogList: ['vandelli@cern.ch'] EmailLogLevel: 'ERROR' EmailLogSender: 'testcastorscript@cern.ch' diff --git a/readme b/readme deleted file mode 100644 index 7ae77cd..0000000 --- a/readme +++ /dev/null @@ -1,19 +0,0 @@ -This is the software that transfers file from ATLAS online infrastructure to -offline storage. The name, CastorScript, has historical reasons: it used to copy -files directly to the CASTOR system (it does not anymore). - -Contents - Configs: reference, template and test configs - DeploymentTest: deployment test - Script: the actual code - ProductionTools: set of Bash and Python scripts used on the production system to - ease maintenance tasks - - pylintrc: configuration of pylint (used by CI) - readme: this file (are you even following?) - run_docker_container.sh: script to start a docker container in CWD for testing (must be run in CastorScript folder) - run_pylint.sh: script to run pylint on all files in Script - run_unit_tests.sh: script to search and run Python unit tests - script_setup.sh: script used in P1 to setup the running environment - watchdog.sh: script called by sysadmin's cron task that starts and maintains - CastorScript instance up and running. Also handles log turn over. diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..7aba768 --- /dev/null +++ b/readme.md @@ -0,0 +1,51 @@ +This is the software that transfers file from ATLAS online infrastructure to +offline storage. The name, CastorScript, has historical reasons: it used to copy +files directly to the CASTOR system (it does not anymore). + +# Contents + +- Configs: reference, template and test configs +- DeploymentTest: deployment test +- Script: the actual code +- ProductionTools: set of Bash and Python scripts used on the production system + to ease maintenance tasks +- pylintrc: configuration of pylint (used by CI) +- readme: this file (are you even following?) +- run_docker_container.sh: script to start a docker container in CWD for testing (must be run in CastorScript folder) +- run_pylint.sh: script to run pylint on all files in Script +- run_unit_tests.sh: script to search and run Python unit tests +- script_setup.sh: script used in P1 to setup the running environment +- watchdog.sh: script called by sysadmin's cron task that starts and maintains + CastorScript instance up and running. Also handles log turn over. + +# Semi-Automated Tests In P1 + +Choose a "CastorScript compatible", unused computer in P1 (unused calib +machines are a good choice). + +The, in P1, from the code source directory + + ./DeploymentTest/p1.test.user.bash pc-tdq-calib-21 + +The output should be self-explanatory. + +There are a number of options to this test script to test specific features +(online documentation is available): + +- `--isers`: enable IS and ERS publication features; requires running a + partition named 'castorscript'; +- `--mig`: enable migration check before deletion; uses + `/eos/ctaatlaspps/daqtest` as CTA target ; +- `--localreader`: no transfer takes place, files are only read locally. + +The last two options are mutually exclusive. + +# Installing a New Version in P1 + + # Tag the commit you want to install in git + ssh atlasgw + # git clone ssh://git@gitlab.cern.ch:7999/atlas-tdaq-software/CastorScript.git + cd CastorScript + git pull + ./point1.deployment.sh CastorScript-00-00-00 + # Let it flow (and check for errors) diff --git a/watchdog.sh b/watchdog.sh index b194c18..8298bae 100755 --- a/watchdog.sh +++ b/watchdog.sh @@ -6,7 +6,7 @@ CONFDIR="/daq_area/castor/${SHORTHOSTNAME}/${USER}" CFG_EXTENSION="cfg" if [ x"$1" = xTEST ]; then - SWDIR="/atlas-home/1/flegoff/CastorScript" + SWDIR="/atlas-home/1/vandelli/CastorScript" CFG_EXTENSION="testcfg" echo "running test configurations: swdir=$SWDIR, cfg_ext=$CFG_EXTENSION" fi @@ -27,7 +27,7 @@ for CFG in $CONFDIR/*.$CFG_EXTENSION; do #get logdir from config file (find LogDir: in CFG | pipe 2nd part | del all ' & " | del last char if == / ) logdir=$(grep 'LogDir:' $CFG | awk '{print $2}' | tr -d "'" | tr -d "\"" | sed "s/\/$//") - + # If the CastorScript crashed, especially on uncaught exceptions, this watchdog # restarts it and we won't notice. Uncaught exception messages end up in # stdouterr: mail it to Fabrice if the file has non-zero length. @@ -38,7 +38,7 @@ for CFG in $CONFDIR/*.$CFG_EXTENSION; do cp $logdir/stdouterr $logdir/stdouterr.raw sed '/Partition ".*" does not exist/d;/CORBA system exception "TRANSIENT(1096024066=TRANSIENT_ConnectFailed)" has been raised/d' -i $logdir/stdouterr if [ -s $logdir/stdouterr ]; then - echo "$CFG" | mail -s "CastorScript instance crashed" -a $logdir/stdouterr -r "atlascdr@cern.ch" flegoff@cern.ch + echo "$CFG" | mail -s "CastorScript instance crashed" -a $logdir/stdouterr -r "atlascdr@cern.ch" wainer.vandelli@cern.ch fi fi -- GitLab