Skip to content

Commit 341156d

Browse files
committed
fix: remove OwnerDN from SiteDirector & PilotStatus
1 parent a83d5bf commit 341156d

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/PilotStatusAgent.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,7 @@ def _addPilotsAccountingReport(self, pilotsData):
190190
pA = PilotAccounting()
191191
pA.setEndTime(pData["LastUpdateTime"])
192192
pA.setStartTime(pData["SubmissionTime"])
193-
retVal = Registry.getUsernameForDN(pData["OwnerDN"])
194-
if not retVal["OK"]:
195-
userName = "unknown"
196-
self.log.error(
197-
"Can't determine username for dn",
198-
f": {pData['OwnerDN']} : {retVal['Message']}",
199-
)
200-
else:
201-
userName = retVal["Value"]
202-
pA.setValueByKey("User", userName)
193+
pA.setValueByKey("User", "unknown")
203194
pA.setValueByKey("UserGroup", pData["OwnerGroup"])
204195
result = getCESiteMapping(pData["DestinationSite"])
205196
if result["OK"] and pData["DestinationSite"] in result["Value"]:

src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ def sendPilotAccounting(self, pilotDict):
13381338
pA = PilotAccounting()
13391339
pA.setEndTime(pilotDict[pRef]["LastUpdateTime"])
13401340
pA.setStartTime(pilotDict[pRef]["SubmissionTime"])
1341-
retVal = Registry.getUsernameForDN(pilotDict[pRef]["OwnerDN"])
1341+
retVal = Registry.getUsernameForDN(self.pilotDN)
13421342
if not retVal["OK"]:
13431343
username = "unknown"
13441344
self.log.error("Can't determine username for dn", pilotDict[pRef]["OwnerDN"])

0 commit comments

Comments
 (0)