summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-11-20 15:03:25 +1100
committerMartin Schwenke <martins@samba.org>2014-12-05 21:02:40 +0100
commit2c4de75d8754616891e97222cfb2ec58fdd8eac2 (patch)
tree1006cc4e286239e12eea4489aad4369912d5231b /ctdb/tests/scripts
parent55df9c86c19e261a2a384ffc4b77c596c84e53a0 (diff)
downloadsamba-2c4de75d8754616891e97222cfb2ec58fdd8eac2.tar.gz
samba-2c4de75d8754616891e97222cfb2ec58fdd8eac2.tar.xz
samba-2c4de75d8754616891e97222cfb2ec58fdd8eac2.zip
ctdb-tests: Update integration tests to use ctdb -X
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/scripts')
-rw-r--r--ctdb/tests/scripts/integration.bash34
1 files changed, 17 insertions, 17 deletions
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash
index 1835949a4f..b75e8f95fe 100644
--- a/ctdb/tests/scripts/integration.bash
+++ b/ctdb/tests/scripts/integration.bash
@@ -163,13 +163,13 @@ all_ips_on_node()
{
local node="$1"
try_command_on_node $node \
- "$CTDB ip -Y | awk -F: 'NR > 1 { print \$2, \$3 }'"
+ "$CTDB ip -X | awk -F'|' 'NR > 1 { print \$2, \$3 }'"
}
_select_test_node_and_ips ()
{
try_command_on_node any \
- "$CTDB ip -Y -n all | awk -F: 'NR > 1 { print \$2, \$3 }'"
+ "$CTDB ip -X -n all | awk -F'|' 'NR > 1 { print \$2, \$3 }'"
test_node="" # this matches no PNN
test_node_ips=""
@@ -209,7 +209,7 @@ select_test_node_and_ips ()
get_test_ip_mask_and_iface ()
{
# Find the interface
- try_command_on_node $test_node "$CTDB ip -v -Y | awk -F: -v ip=$test_ip '\$2 == ip { print \$4 }'"
+ try_command_on_node $test_node "$CTDB ip -v -X | awk -F'|' -v ip=$test_ip '\$2 == ip { print \$4 }'"
iface="$out"
if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
@@ -334,16 +334,16 @@ node_has_status ()
local bits fpat mpat rpat
case "$status" in
- (unhealthy) bits="?:?:?:1:*" ;;
- (healthy) bits="?:?:?:0:*" ;;
- (disconnected) bits="1:*" ;;
- (connected) bits="0:*" ;;
- (banned) bits="?:1:*" ;;
- (unbanned) bits="?:0:*" ;;
- (disabled) bits="?:?:1:*" ;;
- (enabled) bits="?:?:0:*" ;;
- (stopped) bits="?:?:?:?:1:*" ;;
- (notstopped) bits="?:?:?:?:0:*" ;;
+ (unhealthy) bits="?|?|?|1|*" ;;
+ (healthy) bits="?|?|?|0|*" ;;
+ (disconnected) bits="1|*" ;;
+ (connected) bits="0|*" ;;
+ (banned) bits="?|1|*" ;;
+ (unbanned) bits="?|0|*" ;;
+ (disabled) bits="?|?|1|*" ;;
+ (enabled) bits="?|?|0|*" ;;
+ (stopped) bits="?|?|?|?|1|*" ;;
+ (notstopped) bits="?|?|?|?|0|*" ;;
(frozen) fpat='^[[:space:]]+frozen[[:space:]]+1$' ;;
(unfrozen) fpat='^[[:space:]]+frozen[[:space:]]+0$' ;;
(monon) mpat='^Monitoring mode:ACTIVE \(0\)$' ;;
@@ -357,13 +357,13 @@ node_has_status ()
if [ -n "$bits" ] ; then
local out x line
- out=$($CTDB -Y status 2>&1) || return 1
+ out=$($CTDB -X status 2>&1) || return 1
{
read x
while read line ; do
# This needs to be done in 2 steps to avoid false matches.
- local line_bits="${line#:${pnn}:*:}"
+ local line_bits="${line#|${pnn}|*|}"
[ "$line_bits" = "$line" ] && continue
[ "${line_bits#${bits}}" != "$line_bits" ] && return 0
done
@@ -566,7 +566,7 @@ restart_ctdb ()
# Cluster is still healthy. Good, we're done!
if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then
echo "Cluster became UNHEALTHY again [$(date)]"
- onnode -p all ctdb status -Y 2>&1
+ onnode -p all ctdb status -X 2>&1
onnode -p all ctdb scriptstatus 2>&1
echo "Restarting..."
continue
@@ -580,7 +580,7 @@ restart_ctdb ()
done
echo "Cluster UNHEALTHY... too many attempts..."
- onnode -p all ctdb status -Y 2>&1
+ onnode -p all ctdb status -X 2>&1
onnode -p all ctdb scriptstatus 2>&1
# Try to make the calling test fail