From a7ba3ebaaf2bb5ddbad6c347d1ac686dbbc0153f Mon Sep 17 00:00:00 2001 From: anehnis Date: Thu, 16 Feb 2023 09:48:40 -0600 Subject: [PATCH 1/3] Resolve Issue #11367 It appears that aborted-completed workflows did not go through the MSTrCont and MSTrBlock pipelines; therefore any rules from wmcore_transferor for these input datasets were never deleted. I have made a change to the code to have these workflows go through all the pipelines instead of only Agent pipelines. --- src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py index 54d1cd049b..251fa584fc 100644 --- a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py +++ b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py @@ -306,7 +306,7 @@ def _dispatchWflow(self, wflow): # NOTE: We do not check the ParentageResolved flag for these # workflows, but we do need to clean output data placement # rules from the agents for them - for pline in self.agentlines: + for pline in self.cleanuplines: try: pline.run(wflow) except Exception as ex: From 9ab05dde7528a428a694865ea804c158b76e6510 Mon Sep 17 00:00:00 2001 From: anehnis Date: Mon, 20 Feb 2023 10:15:29 -0600 Subject: [PATCH 2/3] Update MSRuleCleaner.py --- .../MicroService/MSRuleCleaner/MSRuleCleaner.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py index 251fa584fc..52e0287066 100644 --- a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py +++ b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py @@ -302,20 +302,6 @@ def _dispatchWflow(self, wflow): msg = "Skipping cleanup step for workflow: %s - RequestType is %s." msg += " Will try to archive it directly." self.logger.info(msg, wflow['RequestName'], wflow['RequestType']) - elif wflow['RequestStatus'] in ['rejected', 'aborted-completed']: - # NOTE: We do not check the ParentageResolved flag for these - # workflows, but we do need to clean output data placement - # rules from the agents for them - for pline in self.cleanuplines: - try: - pline.run(wflow) - except Exception as ex: - msg = "%s: General error from pipeline. Workflow: %s. Error: \n%s. " - msg += "\nWill retry again in the next cycle." - self.logger.exception(msg, pline.name, wflow['RequestName'], str(ex)) - continue - if wflow['CleanupStatus'][pline.name]: - self.wfCounters['cleaned'][pline.name] += 1 elif wflow['RequestStatus'] == 'announced' and not wflow['ParentageResolved']: # NOTE: We skip workflows which are not having 'ParentageResolved' # flag, but we still need some proper logging for them. @@ -340,7 +326,7 @@ def _dispatchWflow(self, wflow): msg += " Will retry again in the next cycle." self.logger.info(msg) self.alertStatusAdvanceExpired(wflow, additionalInfo=msg) - elif wflow['RequestStatus'] == 'announced': + elif wflow['RequestStatus'] == ['announced', 'rejected', 'aborted-completed']: for pline in self.cleanuplines: try: pline.run(wflow) From f99df7055f1c947077d87f30bea80b44cac3fdae Mon Sep 17 00:00:00 2001 From: anehnis Date: Wed, 22 Feb 2023 09:37:17 -0600 Subject: [PATCH 3/3] Update MSRuleCleaner.py --- src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py index 52e0287066..f903d045df 100644 --- a/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py +++ b/src/python/WMCore/MicroService/MSRuleCleaner/MSRuleCleaner.py @@ -326,7 +326,7 @@ def _dispatchWflow(self, wflow): msg += " Will retry again in the next cycle." self.logger.info(msg) self.alertStatusAdvanceExpired(wflow, additionalInfo=msg) - elif wflow['RequestStatus'] == ['announced', 'rejected', 'aborted-completed']: + elif wflow['RequestStatus'] in ['announced', 'rejected', 'aborted-completed']: for pline in self.cleanuplines: try: pline.run(wflow)