Skip to content

SCHED-2593: fix ephemeral worker pod continues provisioning after ResumeTimeout while Slurm reports a terminal DOWN state - #3029

Merged
Uburro merged 1 commit into
soperator-release-4.1from
uburro/SCHED-2593
Sep 23, 2026
Merged

Uburro merged 1 commit into
soperator-release-4.1from
uburro/SCHED-2593

Conversation

@Uburro

@Uburro Uburro commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

When an ephemeral worker took longer to provision than ResumeTimeout, slurmctld marked the node
DOWN+CLOUD+POWERED_DOWN with Reason=... : ResumeTimeout reached, but Soperator kept the ordinal
in NodeSetPowerState.spec.activeNodes, so the pod stayed alive and kept provisioning. Slurm
considered the node powered down while a pod was still running behind it, and nothing exposed which
side was right — customers saw an apparently terminal failure and could not tell whether to
intervene. ResumeTimeout was also hardcoded to 1800s, so the deadline could not be matched to how
long pods actually take.

Separately, PodsReady for ephemeral NodeSets compared available replicas against spec.replicas,
which only bounds the Slurm node range. With 10 replicas and 1 powered-on ordinal the comparison was
1 == 10, so the condition never became True, the phase was stuck at Provisioning however healthy
the NodeSet was, and the reconciler requeued every 10 seconds forever.

Solution

ResumeTimeout is now terminal, and both sides agree on it. Slurm already has a hook for this case,
so no new controller or Slurm API access was needed: ResumeFailProgram is rendered into
slurm.conf pointing at a new power_resume_fail.sh, which runs the same power-down path as a
normal suspend. The ordinals leave activeNodes and the NodeSet controller removes the pods. No new
Go code — power-manager suspend already removes ordinals and the controller already renders the
StatefulSet from activeNodes. Pending jobs are not lost: JobRequeue=1 is already rendered, so
Slurm requeues them and can resume the nodes again.

ResumeTimeout became configurable via slurmConfig.resumeTimeout, defaulting to the previous
1800s. The default is applied when building cluster values, because config rendering walks
SlurmConfig by reflection and skips nil pointers — an unset field would drop the property from
slurm.conf and hand ephemeral nodes Slurm's own default of 60s, which no worker pod can meet.

Also fixed the ephemeral PodsReady comparison to use the number of active ordinals, made the
condition messages concrete (3 of 5 worker pods are available), and documented the contract in a
Resume Failure Flow section.

Testing

Unit tests:

  • Test_buildSlurmConfigFrom — explicit value kept, unset value defaulted, source spec not
    mutated, other fields passed through.
  • TestRenderSlurmConfigMapResumeTimeout — value rendered, and rendered exactly once.
  • TestRenderSlurmConfigMapResumeFailProgram — all three power programs present.
  • TestExpectedReplicas — ephemeral vs non-ephemeral vs zero active ordinals.

make test and make helmtest (357 tests, 17 charts) pass.

Manual verification on a live cluster with a rebuilt slurmctld image:

  1. Confirmed Slurm accepts the parameter — scontrol show config lists ResumeFailProgram.
  2. Set resumeTimeout: 60 and pinned the NodeSet to a nonexistent nodeSelector so the pod
    could never become Ready.
  3. Powered up an ordinal and waited past the deadline.

Slurm invoked the program and the ordinal was removed:

[2026-08-10T15:55:16.299] node worker-ephemral-1 not resumed by ResumeTimeout(60), setting DOWN and POWERED_DOWN
[2026-08-10T15:55:16.299] POWER: power_save: handle failed nodes worker-ephemral-1
[2026-08-10T15:55:18.392] SCRIPT: Handling SLURMSCRIPTD_REQUEST_SCRIPT_COMPLETE (name=resumefailprog, ...)
{"logger":"power_resume_fail","msg":"ResumeFailProgram invoked","nodes":"worker-ephemral-1"}
{"logger":"power-manager","msg":"Starting power action","action":"suspend","nodes":"worker-ephemral-1"}
{"logger":"power-manager","msg":"Updated NodeSetPowerState","nodeSet":"worker-ephemral","action":"suspend","ordinals":[1]}
{"logger":"power-manager","msg":"All nodes in expected state","waitForAdded":false}

Also checked that the happy path is unaffected (a pod that becomes Ready in time is left alone
and ResumeFailProgram is not invoked), that a normal scontrol power down still works, and
that slurm.conf contains exactly one ResumeTimeout= line.

Release Notes

fix: an ephemeral node that fails to resume within ResumeTimeout is now powered back
down — the ordinal is removed from activeNodes and its worker pod is deleted, instead of being
left running behind a node Slurm already considers powered down. Pending jobs are requeued. If your
pods routinely need longer than 1800s to become Ready, raise slurmConfig.resumeTimeout before
upgrading.

Fix: the PodsReady condition and phase of ephemeral NodeSets now reflect the number of powered-on
ordinals instead of spec.replicas, so a healthy ephemeral NodeSet reports Ready rather than
being stuck at Provisioning.

…umeTimeout while Slurm reports a terminal DOWN state
@Uburro Uburro added the feature label Sep 23, 2026
@Uburro Uburro changed the title SCHED-2242: fix ephemeral worker pod continues provisioning after ResumeTimeout while Slurm reports a terminal DOWN state SCHED-2593: fix ephemeral worker pod continues provisioning after ResumeTimeout while Slurm reports a terminal DOWN state Sep 23, 2026
@Uburro
Uburro merged commit 6459451 into soperator-release-4.1 Sep 23, 2026
24 of 25 checks passed
@Uburro
Uburro deleted the uburro/SCHED-2593 branch September 23, 2026 14:42
github-actions Bot added a commit that referenced this pull request Sep 23, 2026
This reverts commit 6459451, reversing
changes made to 2bb1321.

This branch was previously deployed

1 inactive deployment
e2e — 8cab6aa5 Deployed Sep 23, 2026 by Uburro via e2e-test (MAN_H200) #8982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants