summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xctdb/tests/onnode/0070.sh10
-rwxr-xr-xctdb/tests/onnode/0071.sh13
-rwxr-xr-xctdb/tests/onnode/0075.sh10
-rwxr-xr-xctdb/tools/onnode4
4 files changed, 18 insertions, 19 deletions
diff --git a/ctdb/tests/onnode/0070.sh b/ctdb/tests/onnode/0070.sh
index 902d78b231..b071e80a80 100755
--- a/ctdb/tests/onnode/0070.sh
+++ b/ctdb/tests/onnode/0070.sh
@@ -7,11 +7,11 @@ cmd="$ONNODE ok hostname"
define_test "$cmd" "all nodes OK"
ctdb_set_output <<EOF
-:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:
-:0:192.168.1.101:0:0:0:0:0:0:
-:1:192.168.1.102:0:0:0:0:0:0:
-:2:192.168.1.103:0:0:0:0:0:0:
-:3:192.168.1.104:0:0:0:0:0:0:
+:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:PartiallyOnline:ThisNode:
+:0:192.168.1.101:0:0:0:0:0:0:0:Y:
+:1:192.168.1.102:0:0:0:0:0:0:0:N:
+:2:192.168.1.103:0:0:0:0:0:0:0:N:
+:3:192.168.1.104:0:0:0:0:0:0:0:N:
EOF
required_result <<EOF
diff --git a/ctdb/tests/onnode/0071.sh b/ctdb/tests/onnode/0071.sh
index ebf2f61fcd..d594323e3f 100755
--- a/ctdb/tests/onnode/0071.sh
+++ b/ctdb/tests/onnode/0071.sh
@@ -6,13 +6,12 @@ cmd="$ONNODE ok hostname"
define_test "$cmd" "2nd node disconnected"
-ctdb_set_output <<EOF
-ctdb_set_output <<EOF
-:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:
-:0:192.168.1.101:0:0:0:0:0:0:
-:1:192.168.1.102:1:0:0:0:0:0:
-:2:192.168.1.103:0:0:0:0:0:0:
-:3:192.168.1.104:0:0:0:0:0:0:
+ctdb_set_output <<EOF
+:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:PartiallyOnline:ThisNode:
+:0:192.168.1.101:0:0:0:0:0:0:0:Y:
+:1:192.168.1.102:1:0:0:0:0:0:0:N:
+:2:192.168.1.103:0:0:0:0:0:0:0:N:
+:3:192.168.1.104:0:0:0:0:0:0:0:N:
EOF
required_result <<EOF
diff --git a/ctdb/tests/onnode/0075.sh b/ctdb/tests/onnode/0075.sh
index 6ce9b9b190..4276e9c12c 100755
--- a/ctdb/tests/onnode/0075.sh
+++ b/ctdb/tests/onnode/0075.sh
@@ -7,11 +7,11 @@ cmd="$ONNODE con hostname"
define_test "$cmd" "1st node disconnected"
ctdb_set_output <<EOF
-:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:
-:0:192.168.1.101:1:0:0:0:0:0:
-:1:192.168.1.102:0:0:0:0:0:0:
-:2:192.168.1.103:0:0:0:0:0:0:
-:3:192.168.1.104:0:0:0:0:0:0:
+:Node:IP:Disconnected:Banned:Disabled:Unhealthy:Stopped:Inactive:PartiallyOnline:ThisNode:
+:0:192.168.1.101:1:0:0:0:0:0:0:N:
+:1:192.168.1.102:0:0:0:0:0:0:0:Y:
+:2:192.168.1.103:0:0:0:0:0:0:0:N:
+:3:192.168.1.104:0:0:0:0:0:0:0:N:
EOF
required_result <<EOF
diff --git a/ctdb/tools/onnode b/ctdb/tools/onnode
index 11ad708693..0abc13636e 100755
--- a/ctdb/tools/onnode
+++ b/ctdb/tools/onnode
@@ -165,10 +165,10 @@ get_nodes_with_status ()
case "$status" in
healthy)
- # If any bit is not 0, don't match this address.
+ # If any bit is 1, don't match this address.
local s
for s ; do
- [ "$s" = "0" ] || continue 2
+ [ "$s" != "1" ] || continue 2
done
;;
connected)