Skip to content

Commit 3e65242

Browse files
authored
Merge pull request #8422 from chrisburr/feat/override-pilot-json-cs
feat: Support overriding configuration servers ins pilot JSON
2 parents e81873b + 3c927f3 commit 3e65242

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/DIRAC/WorkloadManagementSystem/Utilities/PilotCStoJSONSynchronizer.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,13 @@ def getCSDict(self, includeMasterCS: bool = True) -> DReturnType[Any]:
208208
if defaultSetup:
209209
pilotDict["DefaultSetup"] = defaultSetup
210210

211-
self.log.debug("From DIRAC/Configuration")
212-
configurationServers = gConfig.getServersList()
213-
if not includeMasterCS:
214-
masterCS = gConfigurationData.getMasterServer()
215-
configurationServers = exclude_master_cs_aliases(configurationServers, masterCS)
216-
211+
configurationServers = Operations().getValue("Pilot/OverrideConfigurationServers", [])
212+
if not configurationServers:
213+
self.log.debug("From DIRAC/Configuration")
214+
configurationServers = gConfig.getServersList()
215+
if not includeMasterCS:
216+
masterCS = gConfigurationData.getMasterServer()
217+
configurationServers = exclude_master_cs_aliases(configurationServers, masterCS)
217218
pilotDict["ConfigurationServers"] = configurationServers
218219

219220
preferredURLPatterns = gConfigurationData.extractOptionFromCFG("/DIRAC/PreferredURLPatterns")

0 commit comments

Comments
 (0)