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

Task #8437: Set to QUEUED before handing to SLURM (which can set obs to...

Task #8437: Set to QUEUED before handing to SLURM (which can set obs to STARTED immediately), and some added logging
parent e6545afa
No related branches found
No related tags found
No related merge requests found
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
# #
# $Id$ # $Id$
""" """
Daemon that listens to OTDB status changes to SCHEDULED, requests Daemon that listens to OTDB status changes to SCHEDULED, starts them
the parset of such jobs, and starts them using SLURM and Docker. using SLURM and Docker, and puts the jobs to QUEUED.
The execution chain is as follows: The execution chain is as follows:
...@@ -229,7 +229,9 @@ class PipelineStarter(OTDBBusListener): ...@@ -229,7 +229,9 @@ class PipelineStarter(OTDBBusListener):
# Cancel corresponding SLURM job, causing any successors # Cancel corresponding SLURM job, causing any successors
# to be cancelled as well. # to be cancelled as well.
self.slurm.cancel(parset.slurmJobName()) jobName = parset.slurmJobName()
logger.info("Cancelling job %s", jobName)
self.slurm.cancel(jobName)
""" """
More statusses we want to abort on. More statusses we want to abort on.
...@@ -266,12 +268,22 @@ class PipelineStarter(OTDBBusListener): ...@@ -266,12 +268,22 @@ class PipelineStarter(OTDBBusListener):
""" """
# Collect the parsets of predecessors # Collect the parsets of predecessors
logger.info("Obtaining predecessor parsets")
preparsets = self._getPredecessorParsets(parset) preparsets = self._getPredecessorParsets(parset)
# Collect SLURM job information # Collect SLURM job information
logger.info("Obtaining SLURM job list") logger.info("Obtaining SLURM job list")
slurm_jobs = self.slurm.jobs() slurm_jobs = self.slurm.jobs()
"""
Update OTDB before scheduling the SLURM jobs,
as the SLURM jobs will set the status too.
"""
# Set OTDB status to QUEUED
logger.info("Setting status to QUEUED")
self._setStatus(treeId, "queued")
""" """
Schedule "docker-runPipeline.sh", which will fetch the parset and run the pipeline within Schedule "docker-runPipeline.sh", which will fetch the parset and run the pipeline within
a SLURM job. a SLURM job.
...@@ -350,9 +362,5 @@ class PipelineStarter(OTDBBusListener): ...@@ -350,9 +362,5 @@ class PipelineStarter(OTDBBusListener):
) )
logger.info("Scheduled SLURM job %s" % (slurm_cancel_job_id,)) logger.info("Scheduled SLURM job %s" % (slurm_cancel_job_id,))
# Set OTDB status to QUEUED
logger.info("Setting status to QUEUED")
self._setStatus(treeId, "queued")
logger.info("Pipeline processed.") logger.info("Pipeline processed.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment