fix: drop literal quotes from scontrol Reason/Comment argv (fixes #2954) - #2988
Open
SIDDARTHAREDDY8 wants to merge 1 commit into
Open
SIDDARTHAREDDY8 wants to merge 1 commit into
SIDDARTHAREDDY8 wants to merge 1 commit into
Conversation
subprocess.run receives a list, so no shell strips the quotes in
Reason="{reason}" / Comment="{comment}". Slurm stores the quote
characters as part of the value, so on the OK path
comment.startswith(reason_base) never matches and on_ok uncomment/
undrain never fire. Nodes keep stale [node_problem] comments after
recovery. Fixes nebius#2954.
SIDDARTHAREDDY8
requested a deployment
to
fork-ci
September 16, 2026 19:56 — with
GitHub Actions
Waiting
Author
|
The Label Checker workflow requires at least one label from its list ( |
Collaborator
|
this is PR identical with https://github.com/nebius/soperator/pull/2955/changes |
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
In
helm/slurm-cluster/slurm_scripts/check_runner.py,drain_node,comment_nodeanduncomment_nodebuild the scontrol argv with literal quotes:Reason="{reason}"/Comment="{comment}".Because
subprocess.rungets a list (no shell), nothing strips those quotes, so Slurm stores them as part of the value. On the OK path,comment.startswith(reason_base)then never matches, soon_ok: uncomment/undrainnever fire — a node keeps its[node_problem]comment after the link heals. Reproduced from thescontrol show node --jsonoutput in #2954.Solution
Drop the literal quotes:
Reason={reason},Comment={comment},Comment=(3-line change, verified by diff againstmain).Testing
subprocess.run(captures argv, simulates slurmctld storing elements verbatim): bug reproduced — stored values carry literal", anduncommentstores'""'instead of clearing.test_check_runner_fix.py, stdlibunittest): 8/8 pass — 5 positive (quote-free storage, uncomment clears, full comment→heal→uncomment and drain→heal→undrain round-trips through the realrun_checkFAIL/OK paths with thestartswith(reason_base)guard) and 3 negative (old code never clears on the OK path).subprocess.runwas mocked.Release Notes
N/A (bug fix, no user-facing change beyond correct node recovery).