Skip to content

Commit 457b6fb

Browse files
authored
Merge pull request #7975 from chaen/cherry-pick-2-5aac36b18-integration
[sweep:integration] allow to disable DM transfer as an FTS failover
2 parents 86ecf2a + 1fde1d3 commit 457b6fb

File tree

6 files changed

+11
-2
lines changed

6 files changed

+11
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ exclude: |
1111
1212
repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.4.0
14+
rev: v5.0.0
1515
hooks:
1616
- id: trailing-whitespace
1717
- id: end-of-file-fixer

dirac.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ Systems
467467
{
468468
Location = DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister
469469
FTSMode = True # If True, will use FTS to transfer files
470+
DMMode = True # If false, DataManager will not be used as a failover of FTS transfers
470471
FTSBannedGroups = lhcb_user # list of groups for which not to use FTS
471472
}
472473
SetFileStatus

docs/source/AdministratorGuide/Systems/RequestManagement/rmsObjects.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Details: :py:mod:`~DIRAC.DataManagementSystem.Agent.RequestOperations.ReplicateA
188188
Extra configuration options:
189189

190190
* `FTSMode`: If True, will use FTS to transfer files
191+
* `DMMode`: if False, will not use DataManager transfer as FTS failover
191192
* `FTSBannedGroups` : list of groups for which not to use FTS
192193

193194
------

docs/source/DeveloperGuide/Systems/RequestManagement/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ The timeout for the operation is then calculated from this value and the number
238238

239239
The `ReplicateAndRegister` section accepts extra attributes, specific to FTSTransfers:
240240
* FTSMode (default False): if True, delegate transfers to FTS
241+
* DMMode (default True): if False, will not use DataManager as a failover transfer for FTS
241242
* FTSBannedGroups: list of DIRAC group whose transfers should not go through FTS.
242243

243244
This of course does not cover all possible needs for a specific VO, hence all developers are encouraged to create and keep

src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,12 @@ def dmTransfer(self, fromFTS=False):
518518
return S_OK()
519519
# # loop over files
520520
if fromFTS:
521-
self.log.info("Trying transfer using replica manager as FTS failed")
521+
if getattr(self, "DMMode", True):
522+
self.log.info("Trying transfer using DataManager as FTS failed")
523+
else:
524+
self.log.info("DataManager replication disabled, skipping")
525+
return S_OK()
526+
522527
else:
523528
self.log.info("Transferring files using Data manager...")
524529
errors = defaultdict(int)

src/DIRAC/RequestManagementSystem/ConfigTemplate.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Agents
7070
{
7171
Location = DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister
7272
FTSMode = False
73+
DMMode = True
7374
FTSBannedGroups = dirac_user, lhcb_user
7475
LogLevel = INFO
7576
MaxAttempts = 256

0 commit comments

Comments
 (0)