# loop through the possible IP addreses.
for i in $test_node_ips ; do
prefix="${i%.*}"
- for j in $(seq 1 254) ; do
+ for j in $(seq 101 199) ; do
try="${prefix}.${j}"
# Try to make sure it isn't used anywhere!
done
done
-if [ -n "$add_ip" ] ; then
- echo "Adding IP: ${add_ip/:/ on interface }"
- try_command_on_node $test_node $CTDB addip ${add_ip/:/ }
+if [ -z "$add_ip" ] ; then
+ echo "BAD: Unable to find IP address to add."
+ exit 1
+fi
- echo "Waiting for IP to be added..."
- wait_until 60 ips_are_on_nodeglob $test_node $test_node_ips ${add_ip%/*}
+echo "Adding IP: ${add_ip/:/ on interface }"
+try_command_on_node $test_node $CTDB addip ${add_ip/:/ }
+echo "Waiting for IP to be added..."
+if wait_until 60 ips_are_on_nodeglob $test_node $test_node_ips ${add_ip%/*} ; then
echo "That worked!"
else
- echo "BAD: Unable to find IP address to add."
- testfailures=1
+ echo "BAD: IP didn't get added."
+ try_command_on_node $test_node ctdb ip -n all
+ exit 1
fi