@@ -553,6 +553,7 @@ def _renewJobs(self, arcJobList):
553
553
"%s whose proxy expires at %s" % (arcJob , timeLeft ),
554
554
)
555
555
# Proxy needs to be renewed - try to renew it
556
+ # First, get a new CSR from the delegation
556
557
params = {"action" : "renew" }
557
558
query = self ._urlJoin (os .path .join ("delegations" , delegationID ))
558
559
@@ -562,11 +563,20 @@ def _renewJobs(self, arcJobList):
562
563
params = params ,
563
564
timeout = self .arcRESTTimeout ,
564
565
)
566
+
565
567
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
+ )
567
577
else :
568
578
self .log .debug (
569
- "Proxy not renewed" ,
579
+ "Proxy not renewed, failed to get CSR " ,
570
580
"for job %s with delegation %s" % (arcJob , delegationID ),
571
581
)
572
582
else : # No need to renew. Proxy is long enough
0 commit comments