Repository navigation
SCHED-2593: fix ephemeral worker pod continues provisioning after ResumeTimeout while Slurm reports a terminal DOWN state - #3029
Merged
Conversation
…umeTimeout while Slurm reports a terminal DOWN state
rdjjke
approved these changes
Sep 23, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When an ephemeral worker took longer to provision than
ResumeTimeout, slurmctld marked the nodeDOWN+CLOUD+POWERED_DOWNwithReason=... : ResumeTimeout reached, but Soperator kept the ordinalin
NodeSetPowerState.spec.activeNodes, so the pod stayed alive and kept provisioning. Slurmconsidered 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.
ResumeTimeoutwas also hardcoded to 1800s, so the deadline could not be matched to howlong pods actually take.
Separately,
PodsReadyfor ephemeral NodeSets compared available replicas againstspec.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 atProvisioninghowever healthythe NodeSet was, and the reconciler requeued every 10 seconds forever.
Solution
ResumeTimeoutis 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:
ResumeFailProgramis rendered intoslurm.confpointing at a newpower_resume_fail.sh, which runs the same power-down path as anormal suspend. The ordinals leave
activeNodesand the NodeSet controller removes the pods. No newGo code —
power-manager suspendalready removes ordinals and the controller already renders theStatefulSet from
activeNodes. Pending jobs are not lost:JobRequeue=1is already rendered, soSlurm requeues them and can resume the nodes again.
ResumeTimeoutbecame configurable viaslurmConfig.resumeTimeout, defaulting to the previous1800s. The default is applied when building cluster values, because config rendering walks
SlurmConfigby reflection and skips nil pointers — an unset field would drop the property fromslurm.confand hand ephemeral nodes Slurm's own default of 60s, which no worker pod can meet.Also fixed the ephemeral
PodsReadycomparison to use the number of active ordinals, made thecondition messages concrete (
3 of 5 worker pods are available), and documented the contract in aResume Failure Flow section.
Testing
Unit tests:
Test_buildSlurmConfigFrom— explicit value kept, unset value defaulted, source spec notmutated, 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 testandmake helmtest(357 tests, 17 charts) pass.Manual verification on a live cluster with a rebuilt slurmctld image:
scontrol show configlistsResumeFailProgram.resumeTimeout: 60and pinned the NodeSet to a nonexistentnodeSelectorso the podcould never become Ready.
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
ResumeFailProgramis not invoked), that a normalscontrol power downstill works, andthat
slurm.confcontains exactly oneResumeTimeout=line.Release Notes
fix: an ephemeral node that fails to resume within
ResumeTimeoutis now powered backdown — the ordinal is removed from
activeNodesand its worker pod is deleted, instead of beingleft 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.resumeTimeoutbeforeupgrading.
Fix: the
PodsReadycondition and phase of ephemeral NodeSets now reflect the number of powered-onordinals instead of
spec.replicas, so a healthy ephemeral NodeSet reportsReadyrather thanbeing stuck at
Provisioning.