diff options
| author | Martin Schwenke <martin@meltin.net> | 2014-11-20 14:39:59 +1100 |
|---|---|---|
| committer | Martin Schwenke <martins@samba.org> | 2014-12-05 21:02:40 +0100 |
| commit | 55df9c86c19e261a2a384ffc4b77c596c84e53a0 (patch) | |
| tree | d620d3b95bfda2174163b152aea3b3084ca07260 /ctdb/tests/onnode/stubs | |
| parent | 4940f191d37b5deadc8b1edf0cd516674e5d5d64 (diff) | |
| download | samba-55df9c86c19e261a2a384ffc4b77c596c84e53a0.tar.gz samba-55df9c86c19e261a2a384ffc4b77c596c84e53a0.tar.xz samba-55df9c86c19e261a2a384ffc4b77c596c84e53a0.zip | |
ctdb-tools: Update onnode and ctdb-diagnostics to use ctdb -X
Also update onnode unit tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/onnode/stubs')
| -rwxr-xr-x | ctdb/tests/onnode/stubs/onnode-buggy-001 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ctdb/tests/onnode/stubs/onnode-buggy-001 b/ctdb/tests/onnode/stubs/onnode-buggy-001 index 77a1207d6c..e044ee33a1 100755 --- a/ctdb/tests/onnode/stubs/onnode-buggy-001 +++ b/ctdb/tests/onnode/stubs/onnode-buggy-001 @@ -141,10 +141,10 @@ get_nodes_with_status () local bits case "$status" in healthy) - bits="0:0:0:0:0:0" + bits="0|0|0|0|0|0" ;; connected) - bits="0:[0-1]:[0-1]:[0-1]:[0-1]:[0-1]" + bits="0|[0-1]|[0-1]|[0-1]|[0-1]|[0-1]" ;; *) invalid_nodespec @@ -152,7 +152,7 @@ get_nodes_with_status () if [ -z "$ctdb_status_output" ] ; then # FIXME: need to do something if $CTDB_NODES_SOCKETS is set. - ctdb_status_output=$(ctdb -Y status 2>/dev/null) + ctdb_status_output=$(ctdb -X status 2>/dev/null) if [ $? -ne 0 ] ; then echo "${prog}: unable to get status of CTDB nodes" >&2 exit 1 @@ -164,14 +164,14 @@ get_nodes_with_status () local i for i in $ctdb_status_output ; do # Try removing bits from end. - local t="${i%:${bits}:}" + local t="${i%|${bits}|}" if [ "$t" != "$i" ] ; then # Succeeded. Get address. NOTE: this is an optimisation. # It might be better to get the node number and then get # the nth node to get the address. This would make things # more consistent if $ctdb_base/nodes actually contained # hostnames. - nodes="${nodes} ${t#:*:}" + nodes="${nodes} ${t#|*|}" fi done @@ -186,7 +186,7 @@ get_node_with_property () local prop_node="" if [ "${ctdb_props##:${prop}:}" = "$ctdb_props" ] ; then - prop_node=$(ctdb "$prop" -Y 2>/dev/null) + prop_node=$(ctdb "$prop" -X 2>/dev/null) # We only want the first line. local nl=" " |
