summaryrefslogtreecommitdiffstats
path: root/ctdb/tools
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-10-24 14:15:53 +1100
committerAmitay Isaacs <amitay@gmail.com>2013-10-29 17:14:55 +1100
commite8de58abd7fe7bec7752c6e33ea3e366d3c31a9d (patch)
tree72c0d83375cb5de17b5ecbd6eb719fb7e6ac3dce /ctdb/tools
parentfc7f3358437b5b6d27b4e03ee477a9e7406b87e3 (diff)
downloadsamba-e8de58abd7fe7bec7752c6e33ea3e366d3c31a9d.tar.gz
samba-e8de58abd7fe7bec7752c6e33ea3e366d3c31a9d.tar.xz
samba-e8de58abd7fe7bec7752c6e33ea3e366d3c31a9d.zip
tools/onnode: Fix healthy/ok node handling
This bit-rotted a long time ago when the "ThisNode" column was added to "ctdb -Y status" output. The fake "ctdb -Y status" output in the test was never updated to reflect this change. Instead of making sure that all columns are "0", just check that they're not "1". This implicitly ignores "Y" and "N" in this "ThisNode" column without having to do anything else clever. Also update associated tests. The main "ctdb ok" test had a duplicate opening line for a here document, which was tickled by this change. This fixes samba bz#8122. Signed-off-by: Martin Schwenke <martin@meltin.net> onnode test fixup Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 01a46205c3a3d6609dc0b0324319b89667dffa32)
Diffstat (limited to 'ctdb/tools')
-rwxr-xr-xctdb/tools/onnode4
1 files changed, 2 insertions, 2 deletions
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)