Skip to content

Commit

Permalink
Merge pull request #7588 from aldbr/v8.0_FIX_RemoteRunner-outputs2
Browse files Browse the repository at this point in the history
[v8.0] fix: AREX out and err need to exist before file integrity check
  • Loading branch information
fstagni authored Apr 22, 2024
2 parents e39e36f + 43a9f5c commit e57a310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/DIRAC/Resources/Computing/AREXComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,8 @@ def getJobOutput(self, jobID, workingDirectory=None):
if remoteOutput == f"{stamp}.out":
with open(localOutput) as f:
stdout = f.read()
os.unlink(localOutput)
if remoteOutput == f"{stamp}.err":
with open(localOutput) as f:
stderr = f.read()
os.unlink(localOutput)

return S_OK((stdout, stderr))
2 changes: 2 additions & 0 deletions src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def execute(self, command, workingDirectory=".", numberOfProcessors=1, cleanRemo
self.log.info("The output has been retrieved and declared complete")

# Clean up the job (local files not needed anymore)
os.remove(f"{stamp}.out")
os.remove(f"{stamp}.err")
os.remove(self.checkSumOutput)
os.remove(self.executable)

Expand Down

0 comments on commit e57a310

Please sign in to comment.