Skip to content

Commit

Permalink
Merge pull request #10989 from jhonatanamado/ruciodataset-lifetime
Browse files Browse the repository at this point in the history
Add parameters to rucio datasets (block-level rules)
  • Loading branch information
amaltaro authored Feb 15, 2022
2 parents 373fb4c + b22a05c commit 16c4c36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/WMAgentConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
config.RucioInjector.RSEPostfix = False # enable it to append _Test to the RSE names
config.RucioInjector.metaDIDProject = "Production"
config.RucioInjector.containerDiskRuleParams = {"weight": "ddm_quota", "copies": 2, "grouping": "DATASET"}
config.RucioInjector.blockRuleParams = {}
# this RSEExpr below might be updated by wmagent-mod-config script
config.RucioInjector.containerDiskRuleRSEExpr = "(tier=2|tier=1)&cms_type=real&rse_type=DISK"
config.RucioInjector.rucioAccount = "OVER_WRITE_BY_SECRETS"
Expand Down
2 changes: 2 additions & 0 deletions src/python/WMComponent/RucioInjector/RucioInjectorPoller.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self, config):
self.lastRulesExecTime = 0
self.createBlockRules = config.RucioInjector.createBlockRules
self.containerDiskRuleParams = config.RucioInjector.containerDiskRuleParams
self.blockRuleParams = config.RucioInjector.blockRuleParams
self.containerDiskRuleRSEExpr = config.RucioInjector.containerDiskRuleRSEExpr
if config.RucioInjector.metaDIDProject not in RUCIO_VALID_PROJECT:
msg = "Component configured with an invalid 'project' DID: %s"
Expand Down Expand Up @@ -239,6 +240,7 @@ def insertBlockRules(self):
ignore_availability=True, meta=self.metaData)
rseName = "%s_Test" % item['pnn'] if self.testRSEs else item['pnn']
# DATASET = replicates all files in the same block to the same RSE
kwargs.update(self.blockRuleParams)
resp = self.rucio.createReplicationRule(item['blockname'],
rseExpression=rseName, **kwargs)
if resp:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def createConfig(self):
config.RucioInjector.RSEPostfix = False # enable it to append _Test to the RSE names
config.RucioInjector.metaDIDProject = "Production"
config.RucioInjector.containerDiskRuleParams = {"weight": "ddm_quota", "copies": 2, "grouping": "DATASET"}
config.RucioInjector.blockRuleParams = {}
config.RucioInjector.containerDiskRuleRSEExpr = "(tier=2|tier=1)&cms_type=real&rse_type=DISK"
config.RucioInjector.rucioAccount = "wma_test"
config.RucioInjector.rucioUrl = "http://cms-rucio-int.cern.ch"
Expand Down

0 comments on commit 16c4c36

Please sign in to comment.