File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/DIRAC/WorkloadManagementSystem/Agent Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 8
8
import sys
9
9
import re
10
10
import time
11
+ from pathlib import Path
11
12
12
13
from diraccfg import CFG
13
14
17
18
from DIRAC .Core .Base .AgentModule import AgentModule
18
19
from DIRAC .Core .Security .ProxyInfo import getProxyInfo
19
20
from DIRAC .Core .Security import Properties
21
+ from DIRAC .Core .Security .ProxyFile import writeChainToTemporaryFile
20
22
from DIRAC .Core .Utilities import DErrno
21
23
from DIRAC .Core .Utilities .ObjectLoader import ObjectLoader
22
24
from DIRAC .FrameworkSystem .Client .ProxyManagerClient import gProxyManager
@@ -626,13 +628,15 @@ def _submitJob(
626
628
627
629
self .log .info ("Submitting JobWrapper" , f"{ os .path .basename (wrapperFile )} to { self .ceName } CE" )
628
630
629
- # Pass proxy to the CE
630
- proxy = proxyChain .dumpAllToString ()
631
- if not proxy ["OK" ]:
632
- self .log .error ("Invalid proxy" , proxy )
633
- return S_ERROR ("Payload Proxy Not Found" )
631
+ # Pass proxy to the CE, writing it to a temporary file to ensure the DiracX token is included
632
+ retVal = writeChainToTemporaryFile (proxyChain )
633
+ if not retVal ["OK" ]:
634
+ self .log .error ("Invalid proxy" , retVal ["Message" ])
635
+ return S_ERROR ("Failed to write proxy to temporary file" )
636
+ proxyLocation = Path (retVal ["Value" ])
637
+ payloadProxy = proxyLocation .read_text ()
638
+ proxyLocation .unlink ()
634
639
635
- payloadProxy = proxy ["Value" ]
636
640
try :
637
641
result = self .computingElement .submitJob (
638
642
wrapperFile ,
You can’t perform that action at this time.
0 commit comments