Skip to content

Commit

Permalink
Tranmogrifier : Implement ignore_availability for subscriptions using…
Browse files Browse the repository at this point in the history
… wild_card copies
  • Loading branch information
cserf authored and serfon committed Jul 15, 2024
1 parent 64b1e30 commit 370e96f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/rucio/daemons/transmogrifier/transmogrifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ def run_once(heartbeat_handler: "HeartbeatHandler", bulk: int, **_kwargs) -> boo
# Get all the rule and subscription parameters
rule_dict = __get_rule_dict(rule_dict, subscription)
weight = rule_dict.get("weight", None)
ignore_availability = rule_dict.get("ignore_availability", None)
source_replica_expression = rule_dict.get(
"source_replica_expression", None
)
Expand Down Expand Up @@ -605,8 +606,11 @@ def run_once(heartbeat_handler: "HeartbeatHandler", bulk: int, **_kwargs) -> boo
% (did["scope"], did["name"], rse),
)
if rse in block_listed and rule_dict.get("wild_card"):
logger(logging.INFO, "RSE %s is unavailable and wild_card number of copies is used. Skipping rule creation" % rse)
continue
if ignore_availability:
logger(logging.WARNING, "RSE %s is unavailable, but wild_card number of copies is used with ignore_availability option. Creating a rule" % rse)
else:
logger(logging.INFO, "RSE %s is unavailable and wild_card number of copies is used. Skipping rule creation" % rse)
continue
try:
rule_ids = add_rule(
dids=[
Expand All @@ -626,9 +630,7 @@ def run_once(heartbeat_handler: "HeartbeatHandler", bulk: int, **_kwargs) -> boo
source_replica_expression=source_replica_expression,
activity=rule_dict.get("activity"),
purge_replicas=rule_dict.get("purge_replicas", False),
ignore_availability=rule_dict.get(
"ignore_availability", None
),
ignore_availability=ignore_availability,
comment=rule_dict.get("comment"),
delay_injection=rule_dict.get("delay_injection"),
)
Expand Down

0 comments on commit 370e96f

Please sign in to comment.