Skip to content
Snippets Groups Projects
Commit ac8c4955 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #9682: Let SLURM jobs result in FAILED if pipeline fails, but do not run...

Task #9682: Let SLURM jobs result in FAILED if pipeline fails, but do not run abort-trigger if pipeline could set the ABORTED status itself
parent d322a259
No related branches found
No related tags found
No related merge requests found
...@@ -512,7 +512,9 @@ runcmd docker run --rm --net=host \ ...@@ -512,7 +512,9 @@ runcmd docker run --rm --net=host \
{image} \ {image} \
runPipeline.sh -o {obsid} -c /opt/lofar/share/pipeline/pipeline.cfg.{cluster} runPipeline.sh -o {obsid} -c /opt/lofar/share/pipeline/pipeline.cfg.{cluster}
if [ $? -eq 0 ]; then RESULT=$?
if [ $RESULT -eq 0 ]; then
# notify that we're tearing down # notify that we're tearing down
runcmd {setStatus_completing} runcmd {setStatus_completing}
...@@ -526,15 +528,18 @@ if [ $? -eq 0 ]; then ...@@ -526,15 +528,18 @@ if [ $? -eq 0 ]; then
wget -O - -q "http://ganglia.control.lofar/ganglia/api/events.php?action=add&start_time=now&summary=Pipeline {obsid} FINISHED&host_regex=" wget -O - -q "http://ganglia.control.lofar/ganglia/api/events.php?action=add&start_time=now&summary=Pipeline {obsid} FINISHED&host_regex="
else else
# notify system that we've aborted # notify system that we've aborted
{setStatus_aborted} runcmd {setStatus_aborted}
# notify ganglia # notify ganglia
wget -O - -q "http://ganglia.control.lofar/ganglia/api/events.php?action=add&start_time=now&summary=Pipeline {obsid} ABORTED&host_regex=" wget -O - -q "http://ganglia.control.lofar/ganglia/api/events.php?action=add&start_time=now&summary=Pipeline {obsid} ABORTED&host_regex="
fi fi
# if we've reached this point, the process (not the pipeline) ran ok. # remove the abort-trigger job
# we do not want to trigger the $OBSID-aborted job. scancel --jobname={obsid}-abort-trigger
exit 0
# report status back to SLURM
echo "Pipeline exited with status $RESULT"
exit $RESULT
""".format( """.format(
lofarenv = os.environ.get("LOFARENV", ""), lofarenv = os.environ.get("LOFARENV", ""),
obsid = otdbId, obsid = otdbId,
......
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