Skip to content

Commit

Permalink
Merge pull request #7305 from DIRACGridBot/cherry-pick-2-0eafb3a7c-in…
Browse files Browse the repository at this point in the history
…tegration

[sweep:integration] Use copy+remove in PilotSync agent to avoid SELinux problems
  • Loading branch information
fstagni authored Nov 24, 2023
2 parents 17e86b6 + 58d2546 commit be1d951
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def execute(self):
self.log.info("Moving pilot files", f"to {self.saveDir}")
for tf in allFiles:
# this overrides the destinations
shutil.move(tf, os.path.join(self.saveDir, os.path.basename(tf)))
# use copy & remove rather than move to reset SELinux context on files
shutil.copy(tf, os.path.join(self.saveDir, os.path.basename(tf)))
os.remove(tf)

# Here, attempting upload somewhere, and somehow
for server in self.uploadLocations:
Expand Down

0 comments on commit be1d951

Please sign in to comment.