Skip to content

Commit

Permalink
Assign GLIDEIN_Site if site_only (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Feb 21, 2025
1 parent a007b4c commit 2d3ef71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion outsource/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,11 @@ def __init__(self, context, run_id, ignore_processed=False):
self.rse_constraints[rse]["expr"] = US_ONLY_REQUIREMENTS
for rse in EU_RSES:
self.rse_constraints.setdefault(rse, {})
if EU_ONLY:
if EU_ONLY and not SITE_ONLY:
self.rse_constraints[rse]["expr"] = EU_ONLY_REQUIREMENTS
self.rse_constraints[rse]["rank"] = EU_RANK
if SITE_ONLY and rse in RSE_SITE_MAP:
self.rse_constraints[rse]["expr"] = f'GLIDEIN_Site == "{RSE_SITE_MAP[rse]}"'
self.rse_constraints[rse]["site"] = RSE_SITE_MAP[rse]

self.context = context
Expand Down
10 changes: 10 additions & 0 deletions outsource/submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,16 @@ def add_lower_processing_job(
disk=level["disk"][job_i],
)
if desired_sites:
# Give a hint to glideinWMS for the sites we want
# (mostly useful for XENON VO in Europe).
# Glideinwms is the provisioning system.
# It starts pilot jobs (glideins) at sites when you have idle jobs in the queue.
# Most of the jobs you run to the OSPool (Open Science Pool),
# but you do have a few sites where you have allocations at,
# and those are labeled XENON VO (Virtual Organization).
# The "+" has to be used by non-standard HTCondor attributes.
# The attribute has to have double quotes,
# otherwise HTCondor will try to evaluate it as an expression.
job.add_profiles(Namespace.CONDOR, "+XENON_DESIRED_Sites", f'"{desired_sites}"')
job.add_profiles(Namespace.CONDOR, "requirements", requirements)
job.add_profiles(Namespace.CONDOR, "priority", dbcfg.priority)
Expand Down

0 comments on commit 2d3ef71

Please sign in to comment.