Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Using --pfn with rucio, took back singularity code for gfal since tha…
Browse files Browse the repository at this point in the history
…t was not the problem with triumf
  • Loading branch information
PalNilsson committed Aug 6, 2018
1 parent 3c5242a commit 95899e6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 37 deletions.
5 changes: 1 addition & 4 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ Log tailing (requested by R. Walker)
73.2

list_replicas()
- OUTCOMMENTED: Specifying --pfn in rucio download, stageIn(), which will prevent list_replicas() from being used on server side (rucio_sitemover)

Backslash issue at TRIUMF
- Removed singularity wrapper from stageInFile() and stageOutFile() (gfalcoy_sitemover)
- Specifying --pfn in rucio download, stageIn(), which will prevent list_replicas() from being used on server side (rucio_sitemover)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PICARD 73.2 RC2
PICARD 73.2
8 changes: 4 additions & 4 deletions movers/gfalcopy_sitemover.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def stageOutFile(self, source, destination, fspec):
cmd = '%s --verbose %s -p -f -t %s %s -S %s %s %s' % (self.copy_command, checksum_opt, timeout, gfal_prop, token, srcUrl, destination)

# Prepend the command with singularity if necessary
#from Singularity import singularityWrapper
#cmd = singularityWrapper(cmd, fspec.cmtconfig, dirname(src))
from Singularity import singularityWrapper
cmd = singularityWrapper(cmd, fspec.cmtconfig, dirname(src))

return self._stagefile(cmd, src, destination, filesize, is_stagein=False)

Expand Down Expand Up @@ -215,8 +215,8 @@ def stageInFile(self, source, destination, fspec):
cmd = '%s --verbose %s -f -t %s %s %s %s' % (self.copy_command, checksum_opt, timeout, gfal_prop, source, dstUrl)

# Prepend the command with singularity if necessary
#from Singularity import singularityWrapper
#cmd = singularityWrapper(cmd, fspec.cmtconfig, dirname(destination))
from Singularity import singularityWrapper
cmd = singularityWrapper(cmd, fspec.cmtconfig, dirname(destination))

return self._stagefile(cmd, source, destination, fspec.filesize, is_stagein=True)

Expand Down
56 changes: 28 additions & 28 deletions movers/rucio_sitemover.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,34 @@ def stageIn(self, turl, dst, fspec):
:return: destination file details (ddmendpoint, surl, pfn)
"""

# cmd = 'rucio -v download --dir %s --rse %s --pfn %s %s:%s' % (dirname(dst),
# fspec.ddmendpoint,
# fspec.turl,
# fspec.scope,
# fspec.lfn)

if fspec.replicas:
if not fspec.allowAllInputRSEs:
cmd = 'rucio -v download --dir %s --rse %s %s:%s' % (dirname(dst),
fspec.replicas[0][0],
fspec.scope,
fspec.lfn)
else:
cmd = 'rucio -v download --dir %s %s:%s' % (dirname(dst),
fspec.scope,
fspec.lfn)
else:
if self.isDeterministic(fspec.ddmendpoint):
cmd = 'rucio -v download --dir %s --rse %s %s:%s' % (dirname(dst),
fspec.ddmendpoint,
fspec.scope,
fspec.lfn)
else:
cmd = 'rucio -v download --dir %s --rse %s --pfn %s %s:%s' % (dirname(dst),
fspec.ddmendpoint,
fspec.turl,
fspec.scope,
fspec.lfn)
cmd = 'rucio -v download --dir %s --rse %s --pfn %s %s:%s' % (dirname(dst),
fspec.ddmendpoint,
fspec.turl,
fspec.scope,
fspec.lfn)

# if fspec.replicas:
# if not fspec.allowAllInputRSEs:
# cmd = 'rucio -v download --dir %s --rse %s %s:%s' % (dirname(dst),
# fspec.replicas[0][0],
# fspec.scope,
# fspec.lfn)
# else:
# cmd = 'rucio -v download --dir %s %s:%s' % (dirname(dst),
# fspec.scope,
# fspec.lfn)
# else:
# if self.isDeterministic(fspec.ddmendpoint):
# cmd = 'rucio -v download --dir %s --rse %s %s:%s' % (dirname(dst),
# fspec.ddmendpoint,
# fspec.scope,
# fspec.lfn)
# else:
# cmd = 'rucio -v download --dir %s --rse %s --pfn %s %s:%s' % (dirname(dst),
# fspec.ddmendpoint,
# fspec.turl,
# fspec.scope,
# fspec.lfn)
# Prepend the command with singularity if necessary
from Singularity import singularityWrapper
cmd = singularityWrapper(cmd, fspec.cmtconfig, dirname(dst))
Expand Down

0 comments on commit 95899e6

Please sign in to comment.