Skip to content

Commit 4a3efe8

Browse files
authored
Merge pull request #7213 from aldbr/v8.1_REMOVE_owner-dn-refs-in-sitedirector
[8.1] hackathon fixes
2 parents a83d5bf + aa2b2b6 commit 4a3efe8

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/JobAgent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def execute(self):
254254
)
255255

256256
self.jobReport.setJobStatus(minorStatus="Job Received by Agent", sendFlag=False)
257-
ownerDN = getDNForUsername(owner)["Value"]
257+
ownerDN = getDNForUsername(owner)["Value"][0]
258258
result_setupProxy = self._setupProxy(ownerDN, jobGroup)
259259
if not result_setupProxy["OK"]:
260260
result = self._rescheduleFailedJob(jobID, result_setupProxy["Message"])

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)