Skip to content

Commit da7675f

Browse files
authored
Merge pull request #6837 from sfayer/arex_renew_again
[v7r3] Complete AREX renewal
2 parents 759da9b + f50021a commit da7675f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/DIRAC/Resources/Computing/AREXComputingElement.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ def _renewJobs(self, arcJobList):
553553
"%s whose proxy expires at %s" % (arcJob, timeLeft),
554554
)
555555
# Proxy needs to be renewed - try to renew it
556+
# First, get a new CSR from the delegation
556557
params = {"action": "renew"}
557558
query = self._urlJoin(os.path.join("delegations", delegationID))
558559

@@ -562,11 +563,20 @@ def _renewJobs(self, arcJobList):
562563
params=params,
563564
timeout=self.arcRESTTimeout,
564565
)
566+
565567
if response.ok:
566-
self.log.debug("Proxy successfully renewed", "for job %s" % arcJob)
568+
# Then, sign and upload the certificate
569+
result = self.__uploadCertificate(delegationID, response.text)
570+
if result["OK"]:
571+
self.log.debug("Proxy successfully renewed", "for job %s" % arcJob)
572+
else:
573+
self.log.debug(
574+
"Proxy not renewed, failed to send renewed proxy",
575+
"for job %s with delegation %s: %s" % (arcJob, delegationID, res["Message"]),
576+
)
567577
else:
568578
self.log.debug(
569-
"Proxy not renewed",
579+
"Proxy not renewed, failed to get CSR",
570580
"for job %s with delegation %s" % (arcJob, delegationID),
571581
)
572582
else: # No need to renew. Proxy is long enough

0 commit comments

Comments
 (0)