From c4ba52954b64bc3c9174e85b23822ee2e4c4f12e Mon Sep 17 00:00:00 2001 From: Stefano Belforte Date: Thu, 9 Jan 2025 16:53:12 +0100 Subject: [PATCH] do not use HTC to kill unsubmitted tasks. Fix #8874 --- src/python/TaskWorker/Actions/DagmanKiller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/python/TaskWorker/Actions/DagmanKiller.py b/src/python/TaskWorker/Actions/DagmanKiller.py index 726b6c80b8..ec5108a524 100644 --- a/src/python/TaskWorker/Actions/DagmanKiller.py +++ b/src/python/TaskWorker/Actions/DagmanKiller.py @@ -39,11 +39,12 @@ def executeInternal(self, *args, **kwargs): # pylint: disable=unused-argument raise ValueError("No proxy provided") self.proxy = self.task['user_proxy'] # pylint: disable=attribute-defined-outside-init + if not self.task['tw_name'] or not self.task['clusterid']: + self.logger.info("Task %s was not submitted to HTCondor scheduler yet", self.workflow) + return + self.logger.info("About to kill workflow: %s.", self.workflow) - self.workflow = str(self.workflow) # pylint: disable=attribute-defined-outside-init - if not WORKFLOW_RE.match(self.workflow): - raise Exception("Invalid workflow name.") # Query HTCondor for information about running jobs and update Dashboard appropriately if self.task['tm_collector']: @@ -65,7 +66,8 @@ def executeInternal(self, *args, **kwargs): # pylint: disable=unused-argument # Note that we can not send kills for jobs not in queue at this time; we'll need the # DAG FINAL node to be fixed and the node status to include retry number. - return self.killAll(const) + self.killAll(const) + return def killAll(self, jobConst):