Repository navigation
Avoid slurm draining nodes on failure - #194
Open
simonpintarelli wants to merge 3 commits into
Open
simonpintarelli wants to merge 3 commits into
simonpintarelli wants to merge 3 commits into
Conversation
simonpintarelli
force-pushed
the
avoid-drain
branch
from
October 16, 2026 11:08
b22c27e to
469e70b
Compare
Member
Author
|
Removed vs |
bcumming
approved these changes
Oct 16, 2026
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.
If the sqfs file disappears after job submission, slurm is draining the nodes.
Minimum requirement for the fix is slurm 25.05. The github ci container needs to be updated to ubuntu 26.04 LTS (which provides 25.11). On older slurm versions it won't compile.
Reproducer
sbatch.shManually delete the file.
Release the job:
ESPANK_ERROR vs ESPANK_JOB_FAILURE (kernel backend)
init_post_opt_remote()(src/slurm/plugin_kernel.cpp) runs insideslurm_spank_init_post_optin Slurm's remote context — on a batch step, this andslurm_spank_initshare one result in Slurm's ownspank_init_remote(), andslurmctld's_slurm_rpc_complete_batch_script()drains the compute node for any nonzero result except a short whitelist. A bad or missing squashfs image under the user's scratch tree is not a node-health problem, but returning the codebase's usual-ESPANK_ERRORfrom here drains the node.ESPANK_JOB_FAILUREis on that whitelist. Use it instead of-ESPANK_ERRORfor failures caused by the job's own data or arguments.Cf:
proc_req.c#2433man spankonly describesESPANK_JOB_FAILUREas a value for the plugin-exportedslurm_spank_init_failure_modevariable, and that variable is documented to remap aslurm_spank_initfailure only. ReturningESPANK_JOB_FAILUREdirectly from a different callback (slurm_spank_init_post_opt) works because of how Slurm happens to be implemented, not because the API describeds it.slurm_spank_task_initinstead (plugin_fuse.cpp), a hookman spank's Errors table documents as never draining the node for any command, so this class of bug doesn't apply there. The-ESPANK_ERRORreturns elsewhere inplugin.cpp(option parsing,init_post_opt_local_allocator) run in local/allocator context, which goes through a different Slurm RPC path that never drains a node either.TODO
Review
-ESPANK_ERRORreturn value in the remaining parts of the plugin.