@@ -546,6 +546,7 @@ def _renewJobs(self, arcJobList):
546
546
f"{ arcJob } whose proxy expires at { timeLeft } " ,
547
547
)
548
548
# Proxy needs to be renewed - try to renew it
549
+ # First, get a new CSR from the delegation
549
550
params = {"action" : "renew" }
550
551
query = self ._urlJoin (os .path .join ("delegations" , delegationID ))
551
552
@@ -555,11 +556,21 @@ def _renewJobs(self, arcJobList):
555
556
params = params ,
556
557
timeout = self .arcRESTTimeout ,
557
558
)
559
+
558
560
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
+ )
560
571
else :
561
572
self .log .debug (
562
- "Proxy not renewed" ,
573
+ "Proxy not renewed, failed to get CSR " ,
563
574
f"for job { arcJob } with delegation { delegationID } " ,
564
575
)
565
576
else : # No need to renew. Proxy is long enough
0 commit comments