diff --git a/src/python/WMComponent/AgentStatusWatcher/replication_selector.json b/etc/replication_selector.json similarity index 76% rename from src/python/WMComponent/AgentStatusWatcher/replication_selector.json rename to etc/replication_selector.json index f44830f5d9..9714dece77 100644 --- a/src/python/WMComponent/AgentStatusWatcher/replication_selector.json +++ b/etc/replication_selector.json @@ -12,7 +12,6 @@ "_deleted": {"$exists": false}, "type": "WMCore.WorkQueue.DataStructs.WorkQueueElement.WorkQueueElement", "WMCore\\.WorkQueue\\.DataStructs\\.WorkQueueElement\\.WorkQueueElement": - {"ParentQueueUrl": "config.WorkQueueManager.queueParams['ParentQueueCouchUrl']", - "ChildQueueUrl": "config.WorkQueueManager.queueParams['QueueURL']"} + {"ChildQueueUrl": "config.WorkQueueManager.queueParams['QueueURL']"} } } \ No newline at end of file diff --git a/src/python/WMComponent/AgentStatusWatcher/AgentStatusPoller.py b/src/python/WMComponent/AgentStatusWatcher/AgentStatusPoller.py index de99c3f652..98c5aeaeb0 100644 --- a/src/python/WMComponent/AgentStatusWatcher/AgentStatusPoller.py +++ b/src/python/WMComponent/AgentStatusWatcher/AgentStatusPoller.py @@ -63,8 +63,9 @@ def __init__(self, config): self.hostPortAMQ = getattr(config.AgentStatusWatcher, "hostPortAMQ", [('cms-mb.cern.ch', 61313)]) # Load CouchDB replication filters - jsonDir = os.path.dirname(os.path.abspath(__file__)) - replicationFile = os.path.join(jsonDir, "replication_selector.json") + # see: https://github.com/dmwm/CMSKubernetes/blob/69f0a02a52101ef/docker/pypi/wmagent/Dockerfile#L34 + jsonDir = os.environ.get("WMA_DEPLOY_DIR", "/usr/local") + replicationFile = os.path.join(jsonDir, "etc/replication_selector.json") if os.path.exists(replicationFile): with open(replicationFile, 'r') as fd: self.replicationDict = json.load(fd) @@ -109,7 +110,6 @@ def setUpCouchDBReplication(self): localQInboxURL = "%s_inbox" % self.config.AnalyticsDataCollector.localQueueURL # Update the selector filter workqueueEscapedKey = "WMCore\.WorkQueue\.DataStructs\.WorkQueueElement\.WorkQueueElement" - self.replicationDict['WorkQueue/queueFilter'][workqueueEscapedKey]["ParentQueueUrl"] = parentQueueUrl self.replicationDict['WorkQueue/queueFilter'][workqueueEscapedKey]["ChildQueueUrl"] = childQueueUrl self.replicatorDocs.append({'source': parentQueueUrl, 'target': localQInboxURL,