Skip to content

Commit be1d951

Browse files
authored
Merge pull request #7305 from DIRACGridBot/cherry-pick-2-0eafb3a7c-integration
[sweep:integration] Use copy+remove in PilotSync agent to avoid SELinux problems
2 parents 17e86b6 + 58d2546 commit be1d951

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def execute(self):
9898
self.log.info("Moving pilot files", f"to {self.saveDir}")
9999
for tf in allFiles:
100100
# this overrides the destinations
101-
shutil.move(tf, os.path.join(self.saveDir, os.path.basename(tf)))
101+
# use copy & remove rather than move to reset SELinux context on files
102+
shutil.copy(tf, os.path.join(self.saveDir, os.path.basename(tf)))
103+
os.remove(tf)
102104

103105
# Here, attempting upload somewhere, and somehow
104106
for server in self.uploadLocations:

0 commit comments

Comments
 (0)