Skip to content

Commit

Permalink
fix: remove OwnerDN from SiteDirector & PilotStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Sep 21, 2023
1 parent 21634fb commit b9ef772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions src/DIRAC/WorkloadManagementSystem/Agent/PilotStatusAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,7 @@ def _addPilotsAccountingReport(self, pilotsData):
pA = PilotAccounting()
pA.setEndTime(pData["LastUpdateTime"])
pA.setStartTime(pData["SubmissionTime"])
retVal = Registry.getUsernameForDN(pData["OwnerDN"])
if not retVal["OK"]:
userName = "unknown"
self.log.error(
"Can't determine username for dn",
f": {pData['OwnerDN']} : {retVal['Message']}",
)
else:
userName = retVal["Value"]
pA.setValueByKey("User", userName)
pA.setValueByKey("User", "unknown")
pA.setValueByKey("UserGroup", pData["OwnerGroup"])
result = getCESiteMapping(pData["DestinationSite"])
if result["OK"] and pData["DestinationSite"] in result["Value"]:
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ def sendPilotAccounting(self, pilotDict):
pA = PilotAccounting()
pA.setEndTime(pilotDict[pRef]["LastUpdateTime"])
pA.setStartTime(pilotDict[pRef]["SubmissionTime"])
retVal = Registry.getUsernameForDN(pilotDict[pRef]["OwnerDN"])
retVal = Registry.getUsernameForDN(self.pilotDN)
if not retVal["OK"]:
username = "unknown"
self.log.error("Can't determine username for dn", pilotDict[pRef]["OwnerDN"])
Expand Down

0 comments on commit b9ef772

Please sign in to comment.