Skip to content

Commit 48136a0

Browse files
committed
Fix checkpoint creation to include soft links
1 parent ad291d8 commit 48136a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

MC/bin/o2_dpg_workflow_runner.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ def send_checkpoint(self, taskids, location):
865865
# and copies it to a specific ALIEN location. Not a core function
866866
# just some tool get hold on error conditions appearing on the GRID.
867867

868-
def get_tar_command(dir='./', flags='cf', filename='checkpoint.tar'):
869-
return 'find ' + str(dir) + ' -maxdepth 1 -type f -print0 | xargs -0 tar ' + str(flags) + ' ' + str(filename)
868+
def get_tar_command(dir='./', flags='cf', findtype='f', filename='checkpoint.tar'):
869+
return 'find ' + str(dir) + ' -maxdepth 1 -type ' + str(findtype) + ' -print0 | xargs -0 tar ' + str(flags) + ' ' + str(filename)
870870

871871
if location != None:
872872
print ('Making a failure checkpoint')
@@ -904,6 +904,10 @@ def get_tar_command(dir='./', flags='cf', filename='checkpoint.tar'):
904904
tarcommand = get_tar_command(dir=directory, flags='rf', filename=fn)
905905
actionlogger.info("Tar command is " + tarcommand)
906906
os.system(tarcommand)
907+
# same for soft links
908+
tarcommand = get_tar_command(dir=directory, flags='rf', findtype='l', filename=fn)
909+
actionlogger.info("Tar command is " + tarcommand)
910+
os.system(tarcommand)
907911

908912
# prepend file:/// to denote local file
909913
fn = "file://" + fn

0 commit comments

Comments
 (0)