Skip to content

Commit

Permalink
proper mapping for flocked resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Oct 15, 2021
1 parent 7cc1741 commit ddec5a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions condor_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@
'NERSC': 'US-NERSC',
'CHTC': 'US-CHTC',
'Local Job': 'US-CHTC',
'Wisc-HEP': 'US-UW',
'Wisc-WID': 'US-UW',
'Wisc-Math': 'US-UW',
'Georgia_Tech_PACE_CE_2': 'US-GaTech',
'GaTech': 'US-GaTech',
'GZK': 'US-GZK',
Expand Down Expand Up @@ -351,6 +354,13 @@
'SDSC-Cloud': 'US-OSG-Cloud',
}

flock_pools = {
'cm.chtc.wisc.edu': 'CHTC',
'condor.hep.wisc.edu': 'Wisc-HEP',
'wid-cm.discovery.wisc.edu': 'Wisc-WID',
'condor.math.wisc.edu': 'Wisc-Math',
}

def get_site_from_resource(resource):
if resource in site_names:
return site_names[resource]
Expand Down Expand Up @@ -392,6 +402,8 @@ def is_bad_site(data, site_key='MATCH_EXP_JOBGLIDEIN_ResourceName'):
data[site_key] = data['MachineAttrGLIDEIN_Site0']
elif 'MachineAttrGLIDEIN_SiteResource0' in data and data['MachineAttrGLIDEIN_SiteResource0'] not in bad_sites:
data[site_key] = data['MachineAttrGLIDEIN_SiteResource0']
elif 'LastRemotePool' in data and data['LastRemotePool'] in flock_pools and flock_pools[data['LastRemotePool']] not in bad_sites:
data[site_key] = flock_pools[data['LastRemotePool']]
else:
return True
site = data[site_key]
Expand Down

0 comments on commit ddec5a3

Please sign in to comment.