Skip to content

Commit 984a1c5

Browse files
committed
feat: PilotAgentsDB: remove Broker
1 parent e6aea11 commit 984a1c5

File tree

7 files changed

+10
-23
lines changed

7 files changed

+10
-23
lines changed

src/DIRAC/Interfaces/scripts/dirac_admin_get_job_pilots.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@
1010
$ dirac-admin-get-job-pilots 1848
1111
{'https://marlb.in2p3.fr:9000/bqYViq6KrVgGfr6wwgT45Q': {'AccountingSent': 'False',
1212
'BenchMark': 8.1799999999999997,
13-
'Broker': 'marwms.in2p3.fr',
1413
'DestinationSite': 'lpsc-ce.in2p3.fr',
1514
'GridSite': 'LCG.LPSC.fr',
1615
'GridType': 'gLite',
1716
'Jobs': [1848L],
1817
'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 39, 10),
1918
'OutputReady': 'True',
20-
'OwnerDN': '/O=GRID/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard',
2119
'OwnerGroup': '/biomed',
2220
'ParentID': 0L,
2321
'PilotID': 2247L,

src/DIRAC/Interfaces/scripts/dirac_admin_get_pilot_info.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
$ dirac-admin-get-pilot-info https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw
1111
{'https://marlb.in2p3.fr:9000/26KCLKBFtxXKHF4_ZrQjkw': {'AccountingSent': 'False',
1212
'BenchMark': 0.0,
13-
'Broker': 'marwms.in2p3.fr',
1413
'DestinationSite': 'cclcgceli01.in2p3.fr',
1514
'GridSite': 'LCG.IN2P3.fr',
1615
'GridType': 'gLite',
1716
'LastUpdateTime': datetime.datetime(2011, 2, 21, 12, 49, 14),
1817
'OutputReady': 'False',
19-
'OwnerDN': '/O=GRID/C=FR/O=CNRS/OU=LPC/CN=Sebastien Guizard',
2018
'OwnerGroup': '/biomed',
2119
'ParentID': 0L,
2220
'PilotID': 2241L,

src/DIRAC/WorkloadManagementSystem/Agent/PilotStatusAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def _addPilotsAccountingReport(self, pilotsData):
208208
pA.setValueByKey("Site", "Unknown")
209209
pA.setValueByKey("GridCE", pData["DestinationSite"])
210210
pA.setValueByKey("GridMiddleware", pData["GridType"])
211-
pA.setValueByKey("GridResourceBroker", pData["Broker"])
211+
pA.setValueByKey("GridResourceBroker", "DIRAC")
212212
pA.setValueByKey("GridStatus", pData["Status"])
213213
if "Jobs" not in pData:
214214
pA.setValueByKey("Jobs", 0)

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ def sendPilotAccounting(self, pilotDict):
13541354
pA.setValueByKey("Site", "Unknown")
13551355
pA.setValueByKey("GridCE", pilotDict[pRef]["DestinationSite"])
13561356
pA.setValueByKey("GridMiddleware", pilotDict[pRef]["GridType"])
1357-
pA.setValueByKey("GridResourceBroker", pilotDict[pRef]["Broker"])
1357+
pA.setValueByKey("GridResourceBroker", "DIRAC")
13581358
pA.setValueByKey("GridStatus", pilotDict[pRef]["Status"])
13591359
if "Jobs" not in pilotDict[pRef]:
13601360
pA.setValueByKey("Jobs", 0)

src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def __init__(self, parentLogger=None):
3838
self.lock = threading.Lock()
3939

4040
##########################################################################################
41-
def addPilotTQReference(
42-
self, pilotRef, taskQueueID, ownerGroup, broker="Unknown", gridType="DIRAC", pilotStampDict={}
43-
):
41+
def addPilotTQReference(self, pilotRef, taskQueueID, ownerGroup, gridType="DIRAC", pilotStampDict={}):
4442
"""Add a new pilot job reference"""
4543

4644
err = "PilotAgentsDB.addPilotTQReference: Failed to retrieve a new Id."
@@ -52,9 +50,9 @@ def addPilotTQReference(
5250

5351
req = (
5452
"INSERT INTO PilotAgents( PilotJobReference, TaskQueueID, "
55-
+ "OwnerGroup, Broker, GridType, SubmissionTime, LastUpdateTime, Status, PilotStamp ) "
56-
+ "VALUES ('%s',%d,'%s','%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted','%s')"
57-
% (ref, int(taskQueueID), ownerGroup, broker, gridType, stamp)
53+
+ "OwnerGroup, GridType, SubmissionTime, LastUpdateTime, Status, PilotStamp ) "
54+
+ "VALUES ('%s',%d,'%s','%s',UTC_TIMESTAMP(),UTC_TIMESTAMP(),'Submitted','%s')"
55+
% (ref, int(taskQueueID), ownerGroup, gridType, stamp)
5856
)
5957

6058
result = self._update(req)
@@ -272,7 +270,6 @@ def getPilotInfo(self, pilotRef=False, parentId=False, conn=False, paramNames=[]
272270
"PilotJobReference",
273271
"OwnerGroup",
274272
"GridType",
275-
"Broker",
276273
"Status",
277274
"DestinationSite",
278275
"BenchMark",
@@ -1024,7 +1021,7 @@ def getPilotSummaryWeb(self, selectDict, sortList, startItem, maxItems):
10241021
def getPilotMonitorSelectors(self):
10251022
"""Get distinct values for the Pilot Monitor page selectors"""
10261023

1027-
paramNames = ["OwnerGroup", "GridType", "Broker", "Status", "DestinationSite", "GridSite"]
1024+
paramNames = ["OwnerGroup", "GridType", "Status", "DestinationSite", "GridSite"]
10281025

10291026
resultDict = {}
10301027
for param in paramNames:
@@ -1087,7 +1084,6 @@ def getPilotMonitorWeb(self, selectDict, sortList, startItem, maxItems):
10871084
"PilotJobReference",
10881085
"OwnerGroup",
10891086
"GridType",
1090-
"Broker",
10911087
"Status",
10921088
"DestinationSite",
10931089
"BenchMark",

src/DIRAC/WorkloadManagementSystem/Service/PilotManagerHandler.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def export_getCurrentPilotCounters(cls, attrDict={}):
7575
@deprecated("Use addPilotTQRef")
7676
@classmethod
7777
def export_addPilotTQReference(
78-
cls, pilotRef, taskQueueID, ownerDN, ownerGroup, broker="Unknown", gridType="DIRAC", pilotStampDict={}
78+
cls, pilotRef, taskQueueID, ownerDN, ownerGroup, gridType="DIRAC", pilotStampDict={}
7979
):
8080
"""Add a new pilot job reference"""
8181

@@ -84,13 +84,9 @@ def export_addPilotTQReference(
8484
types_addPilotTQRef = [list, int, str, str]
8585

8686
@classmethod
87-
def export_addPilotTQRef(
88-
cls, pilotRef, taskQueueID, ownerGroup, broker="Unknown", gridType="DIRAC", pilotStampDict={}
89-
):
87+
def export_addPilotTQRef(cls, pilotRef, taskQueueID, ownerGroup, gridType="DIRAC", pilotStampDict={}):
9088
"""Add a new pilot job reference"""
91-
return cls.pilotAgentsDB.addPilotTQReference(
92-
pilotRef, taskQueueID, ownerGroup, broker, gridType, pilotStampDict
93-
)
89+
return cls.pilotAgentsDB.addPilotTQReference(pilotRef, taskQueueID, ownerGroup, gridType, pilotStampDict)
9490

9591
##############################################################################
9692
types_getPilotOutput = [str]

tests/Integration/WorkloadManagementSystem/Test_PilotsClient.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def test_PilotsDB():
6969
"GridType": ["DIRAC"],
7070
"OwnerGroup": ["ownerGroup"],
7171
"DestinationSite": ["NotAssigned"],
72-
"Broker": ["Unknown"],
7372
"Status": ["Submitted"],
7473
"GridSite": ["Unknown"],
7574
}

0 commit comments

Comments
 (0)