Conversation
The scontrol calls pass a list to subprocess.run, so the quotes end up stored in Slurm as part of the value. on_ok undrain/uncomment compare with startswith(reason_base) and never match a value that starts with a quote, and Comment="" stores the string "" instead of clearing it.
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
The scontrol calls in
drain_node,comment_nodeanduncomment_nodepass a list tosubprocess.run, so the quotes around the value are stored in Slurm as part of it.on_ok: undrain/uncommentcompare withstartswith(reason_base)and never match a value that starts with", andComment=""stores""instead of clearing the field. Nodes keep their[node_problem] ...reason and comment after the check starts passing.Solution
Drop the quotes from the three scontrol arguments:
Reason={reason},Comment={comment},Comment=.Testing
On a production cluster a node kept its
[node_problem] ib_link_checkcomment after the IB link came back and the check passed on every run. With the quotes removed, the next hc_program run loggedCheck ib_link_check: OKandUncomment Slurm node worker-gpu-29, and the comment was cleared.Release Notes
Fix:
on_ok: undrainandon_ok: uncommentnow clear the drain reason and node comment set by a check, instead of leaving the node marked forever.Fixes #2954.