Skip to content

Make Slurm epilog cleanup job-scoped #1407

Open

Description

@dholt

Track a focused follow-up for the existing Slurm job-end cleanup behavior.

40-lastuserjob-processes terminates processes by user, 42-lastuserjob-cleanup removes files by user ownership, and 50-lastuserjob-all-enroot-dirs removes configured Enroot paths. Those scopes do not necessarily belong only to the job that just ended.

Acceptance criteria:

  • Limit cleanup to processes and paths owned by the ending job.
  • Preserve unrelated login sessions, concurrent or suspended jobs, and shared paths used on other nodes.
  • Add regression tests for missing/erroring ownership information and overlapping workloads.
  • Preserve useful behavior; do not broadly disable tuning, SSH handling, or cleanup as a shortcut. Any necessary behavior change should be reviewed explicitly.

Related: #1391 and #1404. Historical #1315 concerns PID parsing; this follow-up concerns cleanup scope.

Keep this as a separate backlog item, not a prerequisite for unrelated fixes in the current PR queue.

Activity

  1. added a commit that references this issue on Nov 4, 2026
  2. github-actions commented on Nov 10, 2026

    @github-actions

    This issue is stale because it has been open for 60 days with no activity. Please update the issue or it will be closed in 7 days.

  3. dholt commented on Nov 10, 2026

    @dholt
    ContributorAuthor

    Status update: #1433 (merged for 26.11) makes the Slurm epilog cleanup job-scoped by default. Processes are matched to the ending job through their cgroup, other running jobs of the same user are left alone, and unreadable ownership data defers the cleanup instead of removing anything. slurm_epilog_cleanup_scope: user keeps the previous behavior for now (deprecated). The tests under tests/slurm-epilog/ cover missing ownership data and overlapping jobs.

    Still open here:

    • Processes started outside Slurm (for example over SSH) while a job ends are not protected. They count as unassigned and can be removed after the user's last job ends. This is documented in docs/slurm-cluster/epilog-job-scoped-cleanup.md.
    • The overlap race has not been reproduced end to end through the scheduler, so the fix is backed by tests, not by a live reproduction of the original race.

    Keeping this issue open for those two items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions