Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ def check_consistency(self, slurm_cluster, coldfront_resource):
for resource in resources:
allocations = resource.allocation_set.filter(status__name="Active")
for allocation in allocations:
slurm_acconut_name = allocation.allocationattribute_set.get(
slurm_account_name = allocation.allocationattribute_set.get(
allocation_attribute_type__name="slurm_account_name"
).value
allocation_dict[slurm_acconut_name] = allocation
allocation_dict[slurm_account_name] = allocation

cluster_accounts: list[V0043Account] = slurm_cluster.get_accounts()

Expand All @@ -105,7 +105,7 @@ def check_consistency(self, slurm_cluster, coldfront_resource):

if isinstance(account.associations, Unset):
# account has no associations!
logger.warning(f"SLURM acconut {account.name} has no associations!")
logger.warning(f"SLURM account {account.name} has no associations!")
continue

if account.name in allocation_dict:
Expand Down
5 changes: 2 additions & 3 deletions coldfront/plugins/slurmrest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_accounts(self) -> list[V0043Account]:
)
def delete_association_user_account(self, username: str, account: str, noop: bool = False) -> None:
if noop:
logging.info(f"noop enabled: skip deleting association between user: {username} and acconut: {account}")
logging.info(f"noop enabled: skip deleting association between user: {username} and account: {account}")
return

# start by deleting active jobs for this user
Expand All @@ -114,7 +114,6 @@ def delete_association_user_account(self, username: str, account: str, noop: boo
body_max_submit: V0043OpenapiAssocsResp = V0043OpenapiAssocsResp(associations=[max_submit_assoc])
maxsubmit_set_resp = slurmdb_v0043_post_associations.sync(client=self.root_client, body=body_max_submit)
if maxsubmit_set_resp:
logger.info("resp")
if maxsubmit_set_resp.errors:
for error in maxsubmit_set_resp.errors:
logging.error(f"error posting association: {error}")
Expand Down Expand Up @@ -169,7 +168,7 @@ def delete_association_user_account(self, username: str, account: str, noop: boo
)
def delete_slurm_account(self, account: str, noop: bool = False) -> None:
if noop:
logging.info(f"noop enabled: skip deleting acconut: {account}")
logging.info(f"noop enabled: skip deleting account: {account}")
return

account_delete_resp = slurmdb_v0043_delete_account.sync(client=self.root_client, account_name=account)
Expand Down
Loading