Skip to content

Commit

Permalink
Merge branch 'master' into pr/fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci authored May 29, 2024
2 parents c10a3e3 + a6c63aa commit 19ea08b
Show file tree
Hide file tree
Showing 29 changed files with 421 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pandas==2.2.2
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.1
requests==2.31.0
requests==2.32.0
six==1.16.0
tzdata==2024.1
urllib3==2.2.1
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions projects/UMiss_Bennett.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Department: Physics and Astronomy
Description: 'In the decay of Xi_c baryon to lambda kaon pion, I am performing a likelihood
fitting to extract the coupling to each potential resonance. '
FieldOfScience: Physics and astronomy
FieldOfScienceID: '40.0804'
InstitutionID: https://osg-htc.org/iid/bigpgrrmxblz
Organization: University of Mississippi
PIName: Jake Bennett
8 changes: 8 additions & 0 deletions projects/UNL_Turner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Department: Mechanical and Materials Engineering
Description: 'Working with ultrasonic wave propagation in polycrystalline materials.
Website: https://engineering.unl.edu/quisp/'
FieldOfScience: Engineering
FieldOfScienceID: '14.1901'
InstitutionID: 'https://osg-htc.org/iid/q9k1b8dfrw25'
Organization: University of Nebraska - Lincoln
PIName: Joseph Turner
8 changes: 8 additions & 0 deletions projects/UWMadison_OConnor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Department: Pathology and Laboratory Medicine
Description: "The overarching goal of the O\u2019Connor lab is to contribute meaningfully\
\ to the global response to viral infections impacting human health."
FieldOfScience: Biological and Biomedical Sciences
FieldOfScienceID: 26.0999b
InstitutionID: 'https://osg-htc.org/iid/fq8thqsj99zh'
Organization: University of Wisconsin-Madison
PIName: David O'Connor
14 changes: 7 additions & 7 deletions src/stashcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ def fetch_ligo_authz_list_if_needed():

for authz in extended_authz_list:
if authz.used_in_authfile:
self.id_to_paths[authz.get_authfile_id()].add(path)
self.id_to_str[authz.get_authfile_id()] = str(authz)
self.id_to_paths[authz.authfile_id].add(path)
self.id_to_str[authz.authfile_id] = str(authz)
if authz.used_in_grid_mapfile:
self.grid_mapfile_lines.add(authz.get_grid_mapfile_line())
self.grid_mapfile_lines.add(authz.grid_mapfile_line)

return self

Expand Down Expand Up @@ -220,10 +220,10 @@ def for_origin(cls, topology: Topology, vos_data: VOsData,

for authz in authz_list:
if authz.used_in_authfile:
self.id_to_paths[authz.get_authfile_id()].add(path)
self.id_to_str[authz.get_authfile_id()] = str(authz)
self.id_to_paths[authz.authfile_id].add(path)
self.id_to_str[authz.authfile_id] = str(authz)
if authz.used_in_grid_mapfile:
self.grid_mapfile_lines.add(authz.get_grid_mapfile_line())
self.grid_mapfile_lines.add(authz.grid_mapfile_line)
return self


Expand Down Expand Up @@ -534,7 +534,7 @@ def get_credential_generation_dict_for_namespace(ns: Namespace) -> Optional[Dict
def get_scitokens_list_for_namespace(ns: Namespace) -> List[Dict]:
"""Return the list of scitokens issuer info for the .namespaces[*].scitokens attribute in the namespaces JSON"""
return list(
filter(None, (a.get_namespaces_scitokens_block() for a in ns.authz_list))
filter(None, (a.namespaces_scitokens_block for a in ns.authz_list))
)


Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_institution_accept_type(self, client: flask.Flask):


def test_origin_grid_mapfile(self, client: flask.Flask):
TEST_ORIGIN = "origin-auth2001.chtc.wisc.edu" # This origin serves protected data
TEST_ORIGIN = "ap20.uc.osg-htc.org" # This origin serves protected data
response = client.get("/origin/grid-mapfile")
assert response.status_code == 400 # fqdn not specified

Expand Down
2 changes: 1 addition & 1 deletion src/tests/test_stashcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_origin_grid_mapfile_nohost(self, client: flask.Flask):
assert EMPTY_LINE_REGEX.match(line), f'Unexpected text "{line}".\nFull text:\n{text}\n'

def test_origin_grid_mapfile_with_host(self, client: flask.Flask):
text = stashcache.generate_origin_grid_mapfile(global_data, "origin-auth2001.chtc.wisc.edu",
text = stashcache.generate_origin_grid_mapfile(global_data, "ap20.uc.osg-htc.org",
suppress_errors=False)
num_mappings = 0
for line in text.split("\n"):
Expand Down
44 changes: 21 additions & 23 deletions src/webapp/data_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@


class AuthMethod:
__slots__ = ("authfile_id", "grid_mapfile_line", "namespaces_scitokens_block")
is_public = False
used_in_authfile = False
used_in_scitokens_conf = False
used_in_grid_mapfile = False

def get_authfile_id(self):
return ""
def __init__(self):
self.authfile_id = ""
self.grid_mapfile_line = ""
self.namespaces_scitokens_block = None

def get_scitokens_conf_block(self, service_name: str):
return ""

def get_grid_mapfile_line(self):
return ""

def get_namespaces_scitokens_block(self):
return None

class NullAuth(AuthMethod):
pass
Expand All @@ -37,54 +35,54 @@ class PublicAuth(AuthMethod):
is_public = True
used_in_authfile = True

def __init__(self):
super().__init__()
self.authfile_id = "u *"

def __str__(self):
return "PUBLIC"

def get_authfile_id(self):
return "u *"


class DNAuth(AuthMethod):
__slots__ = ("dn", "dn_hash")
used_in_authfile = True
used_in_grid_mapfile = True

def __init__(self, dn: str):
super().__init__()
self.dn = dn
self.dn_hash = generate_dn_hash(dn)
self.authfile_id = f"u {self.dn_hash}"
self.grid_mapfile_line = f'"{self.dn}" {self.dn_hash}'

def __str__(self):
return "DN: " + self.dn

def get_dn_hash(self):
return generate_dn_hash(self.dn)

def get_authfile_id(self):
return f"u {self.get_dn_hash()}"

def get_grid_mapfile_line(self):
return f'"{self.dn}" {self.get_dn_hash()}'


class FQANAuth(AuthMethod):
__slots__ = ("fqan",)
used_in_authfile = True

def __init__(self, fqan: str):
super().__init__()
self.fqan = fqan
self.authfile_id = f"g {self.fqan}"

def __str__(self):
return "FQAN: " + self.fqan

def get_authfile_id(self):
return f"g {self.fqan}"


class SciTokenAuth(AuthMethod):
__slots__ = ("issuer", "base_path", "restricted_path", "map_subject")
used_in_scitokens_conf = True

def __init__(self, issuer: str, base_path: str, restricted_path: Optional[str], map_subject: bool):
super().__init__()
self.issuer = issuer
self.base_path = base_path
self.restricted_path = restricted_path
self.map_subject = map_subject
self.namespaces_scitokens_block = self._get_namespaces_scitokens_block()

def __str__(self):
return f"SciToken: issuer={self.issuer} base_path={self.base_path} restricted_path={self.restricted_path} " \
Expand All @@ -103,7 +101,7 @@ def get_scitokens_conf_block(self, service_name: str):

return block

def get_namespaces_scitokens_block(self):
def _get_namespaces_scitokens_block(self):
base_path = re.split(r"\s*,\s*", self.base_path)
restricted_path = re.split(r"\s*,\s*", self.restricted_path) if self.restricted_path else []
return {
Expand Down
2 changes: 2 additions & 0 deletions src/webapp/x509.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import hashlib
import re

Expand All @@ -17,6 +18,7 @@
}


@functools.lru_cache(maxsize=2048)
def generate_dn_hash(dn: str) -> str:
"""
Given a DN one-liner as commonly encoded in the grid world
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Resources:
KSI2KMin: 0
StorageCapacityMax: 0
StorageCapacityMin: 0
BNL_ATLAS_7:
BNL_ATLAS_07:
Active: true
ContactLists:
Administrative Contact:
Expand All @@ -219,9 +219,8 @@ Resources:
Name: Robert Hancock
ID: OSG1000212
Description: An OSG CE resource at BNL, mainly serving USATLAS production jobs,
not open to general OSG users.
not open to general OSG users. EL9
FQDN: gridgk07.sdcc.bnl.gov
ID: 438
Services:
CE:
Description: Compute Element
Expand All @@ -242,7 +241,48 @@ Resources:
StorageCapacityMax: 0
StorageCapacityMin: 0
TapeCapacity: 0
BNL_ATLAS_8:
BNL_ATLAS_7:
Active: false
ContactLists:
Administrative Contact:
Primary:
ID: 1e47726bf41f2128059de31cf7bc9c8d5dcadad6
Name: BNL Atlas Tier 1 support
Secondary:
ID: OSG1000638
Name: Ivan Glushkov
Security Contact:
Primary:
Name: BNL Atlas Tier 1 support
ID: 1e47726bf41f2128059de31cf7bc9c8d5dcadad6
Secondary:
Name: Robert Hancock
ID: OSG1000212
Description: An OSG CE resource at BNL, mainly serving USATLAS production jobs,
not open to general OSG users.
FQDN: gridgk07.racf.bnl.gov
ID: 438
Services:
CE:
Description: Compute Element
Details:
hidden: false
sam_uri: htcondor://gridgk07.racf.bnl.gov
VOOwnership:
ATLAS: 100
WLCGInformation:
APELNormalFactor: 12.69
AccountingName: BNL_ATLAS_1
HEPSPEC: 0
InteropAccounting: true
InteropBDII: true
InteropMonitoring: true
KSI2KMax: 0
KSI2KMin: 0
StorageCapacityMax: 0
StorageCapacityMin: 0
TapeCapacity: 0
BNL_ATLAS_08:
Active: true
ContactLists:
Administrative Contact:
Expand All @@ -262,7 +302,6 @@ Resources:
Description: This CE will serve grid jobs submitted to the *local* USATLAS resources,
e.g. for panda queue ANALY_BNL_LOCAL, at BNL.
FQDN: gridgk08.sdcc.bnl.gov
ID: 545
Services:
CE:
Description: Compute Element
Expand All @@ -282,6 +321,46 @@ Resources:
KSI2KMin: 0
StorageCapacityMax: 0
StorageCapacityMin: 0
BNL_ATLAS_8:
Active: false
ContactLists:
Administrative Contact:
Primary:
ID: 1e47726bf41f2128059de31cf7bc9c8d5dcadad6
Name: BNL Atlas Tier 1 support
Secondary:
ID: OSG1000638
Name: Ivan Glushkov
Security Contact:
Primary:
Name: BNL Atlas Tier 1 support
ID: 1e47726bf41f2128059de31cf7bc9c8d5dcadad6
Secondary:
Name: Robert Hancock
ID: OSG1000212
Description: This CE will serve grid jobs submitted to the *local* USATLAS resources,
e.g. for panda queue ANALY_BNL_LOCAL, at BNL.
FQDN: gridgk08.racf.bnl.gov
ID: 545
Services:
CE:
Description: Compute Element
Details:
hidden: false
sam_uri: htcondor://gridgk08.racf.bnl.gov
VOOwnership:
ATLAS: 100
WLCGInformation:
APELNormalFactor: 12.69
AccountingName: BNL_ATLAS_1
HEPSPEC: 0
InteropAccounting: false
InteropBDII: false
InteropMonitoring: false
KSI2KMax: 0
KSI2KMin: 0
StorageCapacityMax: 0
StorageCapacityMin: 0
BNL_ATLAS_Frontier_Squid:
Active: true
ContactLists:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,14 @@
Services:
- XRootD cache server
# ---------------------------------------------------------
- Class: UNSCHEDULED
ID: 1812395767
Description: overloaded
Severity: Outage
StartTime: May 19, 2024 08:01 +0000
EndTime: May 27, 2024 19:30 +0000
CreatedTime: May 20, 2024 21:12 +0000
ResourceName: ComputeCanada-Cedar-Cache
Services:
- XRootD cache server
# ---------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Resources:
XRootD cache server:
Description: ESnet Amsterdam Cache
AllowedVOs:
- LIGO
- ANY
2 changes: 1 addition & 1 deletion topology/Energy Sciences Network/London/ESnetLondon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Resources:
XRootD cache server:
Description: Internet2 London Cache
AllowedVOs:
- LIGO
- ANY
2 changes: 1 addition & 1 deletion topology/IN2P3/IN2P3-CC/IN2P3-OSDF.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Resources:
Primary:
Name: IN2P3 Security
ID: 33fcdfcbfc32afbe7691bb90d29d1a48bcda8918
DN: /DC=org/DC=terena/DC=tcs/C=FR/ST=Paris/O=Centre national de la recherche scientifique/CN=ccstashcache01.in2p3.fr
DN: /DC=org/DC=terena/DC=tcs/C=FR/ST=Paris/O=Centre national de la recherche scientifique/CN=ccstashcacheli01.in2p3.fr
FQDN: ccstashcacheli01.in2p3.fr
Services:
XRootD cache server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Resources:
Name: Fabio Andrijauskas
ID: OSG1000162
FQDN: osg-chicago-stashcache.nrp.internet2.edu
DN: /CN=osg-chicago-stashcache.nrp.internet2.edu
DN: /DC=org/DC=incommon/C=US/ST=Michigan/O=University Corporation For Advanced Internet Development/CN=osg-chicago-stashcache.nrp.internet2.edu
Services:
XRootD cache server:
Description: Internet2 Chicago Cache
Expand Down
11 changes: 11 additions & 0 deletions topology/Purdue University/Purdue CMS/Purdue_downtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2131,3 +2131,14 @@
Services:
- net.perfSONAR.Latency
# ---------------------------------------------------------
- Class: SCHEDULED
ID: 1819162937
Description: Power transfer for datacenter circuits
Severity: Severe
StartTime: May 30, 2024 11:00 +0000
EndTime: May 30, 2024 21:00 +0000
CreatedTime: May 28, 2024 17:11 +0000
ResourceName: Purdue-EOS-SE
Services:
- EOS
# ---------------------------------------------------------
Loading

0 comments on commit 19ea08b

Please sign in to comment.