Skip to content

Commit

Permalink
Merge pull request #7037 from sfayer/webdav_fix_backport
Browse files Browse the repository at this point in the history
[v7r3] Backport GFAL2 webdav/https timeout workaround
  • Loading branch information
chrisburr authored Jun 16, 2023
2 parents 1e06df0 + 5286d86 commit 0495fe8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DIRAC/Resources/Storage/GFAL2_StorageBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,11 @@ def _getSingleFile(self, src_url, dest_file, disableChecksum=False):
# gfal2 needs a protocol to copy local which is 'file:'
if not dest_file.startswith("file://"):
dest = "file://%s" % os.path.abspath(dest_file)
self.ctx.filecopy(params, str(src_url), str(dest))
# We can remove the context manager when https://its.cern.ch/jira/browse/DMC-1371
# is solved
# The problem is gfal2 not respecting the parameter timeout
with setGfalSetting(self.ctx, "HTTP PLUGIN", "OPERATION_TIMEOUT", params.timeout):
self.ctx.filecopy(params, str(src_url), str(dest))
if useChecksum:
# gfal2 did a checksum check, so we should be good
return S_OK(remoteSize)
Expand Down

0 comments on commit 0495fe8

Please sign in to comment.