Skip to content

Commit

Permalink
Node returns drained and can be resumed (or cancelled) by NHC
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Kruiten committed May 22, 2020
1 parent 7486112 commit 3df3e9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helpers/node-mark-online
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ elif [[ "$NHC_RM" == "slurm" ]]; then
# SLURM does not run the HealthCheckProgram on nodes in the DOWN state,
# but if someone runs NHC by hand, we want to be able to do the right thing.
case "$STATUS" in
down*|drain*|drng*|fail*|maint*)
down*|drain*|drng*|fail*|maint*|boot*)
# If there is no old note, and we've not been told to ignore that, do not online the node.
if [[ "$OLD_NOTE_LEADER" == "none" && "$IGNORE_EMPTY_NOTE" != "1" ]]; then
echo "$0: Not onlining $HOSTNAME: No note set."
Expand Down
3 changes: 1 addition & 2 deletions helpers/node-mark-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NOTE="$*"
if [[ "$NHC_RM" == "slurm" ]]; then
SLURM_SINFO="${SLURM_SINFO:-sinfo}"
SLURM_SCONTROL="${SLURM_SCONTROL:-scontrol}"
SLURM_SC_REBOOT_ARGS="${SLURM_SC_REBOOT_ARGS:-reboot ASAP NextState=RESUME}"
SLURM_SC_REBOOT_ARGS="${SLURM_SC_REBOOT_ARGS:-reboot ASAP NextState=DOWN}"

LINE=( $($SLURM_SINFO -o '%t %E' -hn $HOSTNAME) )
STATUS="${LINE[0]}"
Expand All @@ -47,7 +47,6 @@ if [[ "$NHC_RM" == "slurm" ]]; then
if [[ "$OLD_NOTE_LEADER" != "none" && "$OLD_NOTE_LEADER" != "$LEADER" ]]; then
LEADER="$OLD_NOTE_LEADER"
NOTE="$OLD_NOTE"
SLURM_SC_REBOOT_ARGS="reboot ASAP NextState=DOWN"
fi
echo "$0: Marking $STATUS $HOSTNAME for reboot: $LEADER $NOTE"
exec $SLURM_SCONTROL $SLURM_SC_REBOOT_ARGS Reason="$LEADER $NOTE" $HOSTNAME
Expand Down

0 comments on commit 3df3e9c

Please sign in to comment.