Skip to content

Commit c93c74e

Browse files
committed
sweep: #6837 Complete AREX renewal
1 parent 8c2a829 commit c93c74e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/DIRAC/Resources/Computing/AREXComputingElement.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ def _renewJobs(self, arcJobList):
546546
f"{arcJob} whose proxy expires at {timeLeft}",
547547
)
548548
# Proxy needs to be renewed - try to renew it
549+
# First, get a new CSR from the delegation
549550
params = {"action": "renew"}
550551
query = self._urlJoin(os.path.join("delegations", delegationID))
551552

@@ -555,11 +556,21 @@ def _renewJobs(self, arcJobList):
555556
params=params,
556557
timeout=self.arcRESTTimeout,
557558
)
559+
558560
if response.ok:
559-
self.log.debug("Proxy successfully renewed", f"for job {arcJob}")
561+
# Then, sign and upload the certificate
562+
result = self.__uploadCertificate(delegationID, response.text)
563+
if result["OK"]:
564+
self.log.debug("Proxy successfully renewed", f"for job {arcJob}")
565+
else:
566+
self.log.debug(
567+
"Proxy not renewed, failed to send renewed proxy",
568+
f"for job {arcJob} with delegation {delegationID}:",
569+
result["Message"],
570+
)
560571
else:
561572
self.log.debug(
562-
"Proxy not renewed",
573+
"Proxy not renewed, failed to get CSR",
563574
f"for job {arcJob} with delegation {delegationID}",
564575
)
565576
else: # No need to renew. Proxy is long enough

0 commit comments

Comments
 (0)