cluster_is_healthy
echo "Getting list of public IPs..."
-try_command_on_node -v 1 $CTDB ip -n all
+try_command_on_node -v 1 "$CTDB ip -n all | tail -n +2"
ips=$(echo "$out" | sed \
- -e '1d')
-machineout1=":Public IP:Node:"
-machineout2=$(echo "$out" | sed \
- -e '1d' \
- -e 's@^@:@' \
- -e 's@ @:@' \
- -e 's@$@:@')
-machineout=`echo -e "$machineout1\n$machineout2"`
+ -e 's@ node\[@ @' \
+ -e 's@\].*$@@')
+machineout=$(echo "$out" | sed -r \
+ -e 's@^| |$@:@g' \
+ -e 's@[[:alpha:]]+\[@@g' \
+ -e 's@\]@@g')
while read ip pnn ; do
try_command_on_node $pnn "ip addr show"
[ "$testfailures" != 1 ] && echo "Looks good!"
-cmd="$CTDB -Y ip -n all"
+cmd="$CTDB -Y ip -n all | tail -n +2"
echo "Checking that \"$cmd\" produces expected output..."
try_command_on_node 1 "$cmd"