ctdb-tests: Drop unused node statuses frozen/unfrozen
authorMartin Schwenke <martin@meltin.net>
Mon, 29 Jul 2019 05:40:16 +0000 (15:40 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 21 Aug 2019 11:50:30 +0000 (11:50 +0000)
Silently drop unused local variable mpat.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14085

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/scripts/integration.bash

index 489cc3b5cdb44fb53bf60ba4a075ec103bd2d310..c4d5179d902dfada8ee10b7ebcc324113ae5c47d 100644 (file)
@@ -322,7 +322,7 @@ node_has_status ()
        local pnn="$1"
        local status="$2"
 
-       local bits fpat mpat rpat
+       local bits rpat
        case "$status" in
        unhealthy)    bits="?|?|?|1|*" ;;
        healthy)      bits="?|?|?|0|*" ;;
@@ -334,8 +334,6 @@ node_has_status ()
        enabled)      bits="?|?|0|*" ;;
        stopped)      bits="?|?|?|?|1|*" ;;
        notstopped)   bits="?|?|?|?|0|*" ;;
-       frozen)       fpat='^[[:space:]]+frozen[[:space:]]+1$' ;;
-       unfrozen)     fpat='^[[:space:]]+frozen[[:space:]]+0$' ;;
        recovered)    rpat='^Recovery mode:RECOVERY \(1\)$' ;;
        notlmaster)   rpat="^hash:.* lmaster:${pnn}\$" ;;
        *)
@@ -360,12 +358,10 @@ node_has_status ()
                        done
                        return 1
                } <<<"$out" # Yay bash!
-       elif [ -n "$fpat" ] ; then
-               $CTDB statistics -n "$pnn" | egrep -q "$fpat"
        elif [ -n "$rpat" ] ; then
                ! $CTDB status -n "$pnn" | egrep -q "$rpat"
        else
-               echo 'node_has_status: unknown mode, neither $bits nor $fpat is set'
+               echo 'node_has_status: unknown mode, neither $bits nor $rpat is set'
                return 1
        fi
 }