Skip to content

[CLUST-348] remove Slurm accounts when archiving groups - #184

Merged
Kyle9410-Chen merged 3 commits into
mainfrom
feat/CLUST-348-remove-slurm-accounts-when-archiving-groups
Aug 27, 2026
Merged

[CLUST-348] remove Slurm accounts when archiving groups#184
Kyle9410-Chen merged 3 commits into
mainfrom
feat/CLUST-348-remove-slurm-accounts-when-archiving-groups

Conversation

@joegoooo

Copy link
Copy Markdown
Contributor

Type of changes

  • Feature

Purpose

Why: Archived groups currently retain their Slurm accounts, meaning they still have access to compute resources. An archived group should not be able to submit jobs.

What: Delete a group's Slurm account tree when archiving, and recreate it when unarchiving — so archived groups lose compute access and unarchived groups regain it.

How: Added saga steps to the existing Archive and Unarchive methods in internal/group/service.go:

  • Archive — after removing LDAP users, deletes the Slurm account tree children-first (admin → base → top), mirroring the existing Delete method's pattern
  • Unarchive — after unarchiving the DB record, recreates the Slurm account tree top-first then children, mirroring the existing Create method's pattern

Both use the saga pattern with compensation callbacks for rollback on failure.

Additional Information

  • No interface changes (Store, SlurmStore signatures unchanged)
  • No handler changes needed
  • Slurm account hierarchy: top-level (<group-cn>) → children (<group-cn>-base, <group-cn>-admin)
  • Deletion order is children-first because slurmdbd refuses to delete an account with child associations
  • The saga compensation logic mirrors what Create and Delete already do, ensuring consistency across all group lifecycle operations

joegoooo and others added 3 commits August 19, 2026 18:00
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… Archive

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joegoooo joegoooo closed this Aug 19, 2026
@joegoooo joegoooo reopened this Aug 19, 2026
@joegoooo
joegoooo marked this pull request as ready for review August 19, 2026 12:13
@joegoooo
joegoooo requested a review from Kyle9410-Chen August 19, 2026 12:13
@joegoooo joegoooo self-assigned this Aug 19, 2026
@joegoooo joegoooo changed the title feat: remove Slurm accounts when archiving groups [CLUST-348] remove Slurm accounts when archiving groups Aug 19, 2026
@Kyle9410-Chen
Kyle9410-Chen merged commit 3da004b into main Aug 27, 2026
13 checks passed
@Kyle9410-Chen
Kyle9410-Chen deleted the feat/CLUST-348-remove-slurm-accounts-when-archiving-groups branch August 27, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants