From a23be0cd53ef8ebcd6f57665f353f8f40becd9ce Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Thu, 17 Oct 2024 14:46:55 -0400 Subject: [PATCH] Move filter replication json document under etc/ Do not set ParentQueueUrl in the selector filter --- .../AgentStatusWatcher => etc}/replication_selector.json | 0 .../WMComponent/AgentStatusWatcher/AgentStatusPoller.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename {src/python/WMComponent/AgentStatusWatcher => etc}/replication_selector.json (100%) diff --git a/src/python/WMComponent/AgentStatusWatcher/replication_selector.json b/etc/replication_selector.json similarity index 100% rename from src/python/WMComponent/AgentStatusWatcher/replication_selector.json rename to etc/replication_selector.json 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,