SCHED-1897: Add guard to avoid calling get_node_info out of hc_program for undrain…#2719
Open
fabrizio2210 wants to merge 3 commits into
Open
SCHED-1897: Add guard to avoid calling get_node_info out of hc_program for undrain…#2719fabrizio2210 wants to merge 3 commits into
fabrizio2210 wants to merge 3 commits into
Conversation
asteny
reviewed
Jul 9, 2026
…-tests Run Slurm script unit tests in CI
Collaborator
Author
|
This is the stats of running 100 jobs on 2 nodes (all the jobs were scheduled on one node).
After the fix, same amount of jobs:
It means 48% less RPC calls. |
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
Passive checks can generate unnecessary Slurm RPCs from job-coupled contexts.
In particular,
boot_disk_fullis configured withon_ok: undrainand runs in bothprologandhc_program. Although the check itself only performs a local disk-usage check,check_runner.pyevaluates theon_ok: undrainpath after a successfulprologrun. This callsget_node_info(), which executesscontrol show node ... --json.As a result, every successful
boot_disk_fullexecution inprologcan produce an unnecessaryscontrol show nodecall. This adds per-job/per-node RPC load to Slurm and was identified as one of the main contributors in SCHED-1897.Solution
Restrict
on_okrecovery actions to thehc_programcontext.undrainanduncommentare intended to be issued only by periodic health checks, not byprologorepilog. With this change, successful checks inprolog/epilogno longer evaluate theundrain/uncommentpath and therefore no longer callget_node_info()just to decide whether a node should be resumed or uncommented.Failure handling remains unchanged: checks can still drain or comment nodes on failure according to their configuration.
Testing
Tested with local
check_runner_test.py.Release Notes
Fix: Reduced Slurm RPC load from passive checks by preventing
prolog/epilogsuccess paths from evaluatingundrain/uncommentactions.The intended auto-recovery behavior remains available from
hc_program; no user-facing configuration changes or migrations are required.