Skip to content

check_runner: do not quote scontrol Reason= and Comment= values - #2955

Open
dnugmanov wants to merge 1 commit into
nebius:mainfrom
dnugmanov:fix/check-runner-scontrol-quoting
Open

dnugmanov wants to merge 1 commit into
nebius:mainfrom
dnugmanov:fix/check-runner-scontrol-quoting

Conversation

@dnugmanov

Copy link
Copy Markdown
Contributor

Problem

The scontrol calls in drain_node, comment_node and uncomment_node pass a list to subprocess.run, so the quotes around the value are stored in Slurm as part of it. on_ok: undrain / uncomment compare with startswith(reason_base) and never match a value that starts with ", and Comment="" 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_check comment after the IB link came back and the check passed on every run. With the quotes removed, the next hc_program run logged Check ib_link_check: OK and Uncomment Slurm node worker-gpu-29, and the comment was cleared.

Release Notes

Fix: on_ok: undrain and on_ok: uncomment now clear the drain reason and node comment set by a check, instead of leaving the node marked forever.

Fixes #2954.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check_runner.py stores scontrol Reason/Comment with literal quotes, so on_ok undrain/uncomment never fires

1 participant