wait_until 60 ips_are_on_nodeglob "$@"
}
+node_has_some_ips ()
+{
+ local node="$1"
+
+ local out
+
+ all_ips_on_node 1
+
+ while read ip pnn ; do
+ if [ "$node" = "$pnn" ] ; then
+ return 0
+ fi
+ done <<<"$out" # bashism to avoid problem setting variable in pipeline.
+
+ return 1
+}
+
+wait_until_node_has_some_ips ()
+{
+ echo "Waiting for node to have some IPs..."
+
+ wait_until 60 node_has_some_ips "$@"
+}
+
get_src_socket ()
{
local proto="$1"
failed over to other nodes.
5. Enable the disabled node using 'ctdb enable -n '<node>'.
6. Verify that the status changes back to 'OK'.
-7. Verify that the public IP addreses served by the disabled node are
- failed back to the node.
+7. Verify that some public IP addreses are failed back to the node.
Expected results:
wait_until_node_has_status $test_node enabled
-# BUG: this is only guaranteed if DeterministicIPs is 1 and
-# NoIPFailback is 0.
-if wait_until_ips_are_on_nodeglob "$test_node" $test_node_ips ; then
- echo "All IPs moved."
+if wait_until_node_has_some_ips "$test_node" ; then
+ echo "OK."
else
- echo "Some IPs didn't move."
+ echo "No IPs moved to node $test_node."
testfailures=1
fi
the node are failed over to one of the other nodes.
5. Use 'ctdb continue' to bring the node back online.
6. Verify that the status of the node changes back to 'OK' and that
- the public IP addresses move back to the node.
+ some public IP addresses move back to the node.
Expected results:
wait_until_node_has_status $test_node notstopped
-# BUG: this is only guaranteed if DeterministicIPs is 1 and
-# NoIPFailback is 0.
-if wait_until_ips_are_on_nodeglob "$test_node" $ips ; then
- echo "All IPs moved."
+if wait_until_no de_has_some_ips "$test_node" ; then
+ echo "OK."
else
- echo "Some IPs didn't move."
+ echo "No IPs moved to node $test_node."
testfailures=1
fi