mej / nhc

LBNL Node Health Check
Other
213 stars 78 forks source link

missing double semicolon in helpers/node-mark-offline in current master #103

Closed smoors closed 2 years ago

smoors commented 3 years ago

as you can see below there is a missing double semicolon ;; in the case block (after line 69) in file helpers/node-mark-offline, which causes bash to fail with syntax error:

 65     case "$STATUS" in
 66         *'@'*|*'#'*|boot*)
 67             # These states aren't handled yet.
 68             echo "$0:  State \"$STATUS\" not yet handled; ignoring."
 69             exit 0
 70         alloc*|comp*|drain*|drng*|fail*|idle*|maint*|mix*|resume*|resv*|undrain*)
 71             case "$STATUS" in
 72                 drain*|drng*|fail*|maint*)
 73                     # If the node is already offline, and there is no old note, and
 74                     # we've not been told to ignore that, do not touch the node.
 75                     if [[ "$OLD_NOTE_LEADER" == "none" && "$IGNORE_EMPTY_NOTE" != "1" ]]; then
 76                         echo "$0:  Not offlining $HOSTNAME:  Already offline with no note set."
 77                         exit 0
 78                     fi
 79                     ;;
 80             esac
 81             # If there's an old note that wasn't set by NHC, preserve it.
 82             if [[ "$OLD_NOTE_LEADER" != "none" && "$OLD_NOTE_LEADER" != "$LEADER" ]]; then
 83                 LEADER="$OLD_NOTE_LEADER"
 84                 NOTE="$OLD_NOTE"
 85             fi
 86             echo "$0:  Marking $STATUS $HOSTNAME offline:  $LEADER $NOTE"
 87             exec $SLURM_SCONTROL $SLURM_SC_OFFLINE_ARGS NodeName=$HOSTNAME Reason="$LEADER $NOTE"
 88             ;;
 89         down*)
 90             echo "$0:  Not changing state of down node $HOSTNAME."
 91             ;;
 92         *)  echo "$0:  Not sure how to handle node state \"$STATUS\" on $HOSTNAME" ;;
 93     esac
nktl commented 2 years ago

Same here, it makes build from head unusable at the moment without monkeypatch.

basvandervlies commented 2 years ago

Had the same issue as above see pull request: