diff --git a/SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py b/SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py index d0c66a8ab8663016506a185cef3cc12e801100f0..206e98a41dc525927616793332b0708fc7f127f6 100755 --- a/SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py +++ b/SAS/ResourceAssignment/ResourceAssigner/lib/assignment.py @@ -155,6 +155,18 @@ class ResourceAssigner(): except Exception as e: logger.error(e) + try: + # fix for MoM bug introduced before NV's holiday + # MoM sets ProcessingCluster.clusterName to CEP2 even when inputxml says CEP4 + # so, override it here if needed, and update to otdb + processingClusterName = mainParset.getString('Observation.Cluster.ProcessingCluster.clusterName', '') + if processingClusterName != clusterName: + logger.info('overwriting and uploading processingClusterName to otdb from %s to %s for otdb_id=%s', + processingClusterName, clusterName, otdb_id) + self.otdbrpc.taskSetSpecification(otdb_id, { 'LOFAR.ObsSW.Observation.Cluster.ProcessingCluster.clusterName': clusterName }) + except Exception as e: + logger.error(e) + # insert new task and specification in the radb # any existing specification and task with same otdb_id will be deleted automatically logger.info('doAssignment: insertSpecification momId=%s, otdb_id=%s, status=%s, taskType=%s, startTime=%s, endTime=%s cluster=%s' %