Skip to content

Commit

Permalink
fix: Use copy+remove in pilotsync agent to avoid SELinux problems
Browse files Browse the repository at this point in the history
  • Loading branch information
sfayer committed Nov 23, 2023
1 parent 320ecd4 commit 9d7bad2
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 9d7bad2

Please sign in to comment.