mej / nhc

LBNL Node Health Check
Other
226 stars 79 forks source link

Error in nhc/helpers/node-mark-offline #108

Closed quasigeek closed 1 year ago

quasigeek commented 2 years ago

Hi,

There seems to be an error in the script nhc/helpers/node-mark-offline. there is a missing ";;" between line 69 and 70 to properly pass from one "case" statement to the other.

    case "$STATUS" in
        *'@'*|*'#'*|boot*)
            # These states aren't handled yet.
            echo "$0:  State \"$STATUS\" not yet handled; ignoring."
            exit 0
        alloc*|comp*|drain*|drng*|fail*|idle*|maint*|mix*|resume*|resv*|undrain*)
            case "$STATUS" in
                drain*|drng*|fail*|maint*)
                    # If the node is already offline, and there is no old note, and
                    # we've not been told to ignore that, do not touch the node.
...

should be:

    case "$STATUS" in
        *'@'*|*'#'*|boot*)
            # These states aren't handled yet.
            echo "$0:  State \"$STATUS\" not yet handled; ignoring."
            exit 0
            ;;
        alloc*|comp*|drain*|drng*|fail*|idle*|maint*|mix*|resume*|resv*|undrain*)
            case "$STATUS" in
                drain*|drng*|fail*|maint*)
                    # If the node is already offline, and there is no old note, and
                    # we've not been told to ignore that, do not touch the node.
...
quasigeek commented 2 years ago

Repeat of issue #103 Sorry for the doubling of issue

mej commented 1 year ago

This was fixed in PR #107 with commit 2ecacfe8; duplicate of #103. Closing.