From 6ad263ff94ed77bb1a7fc7baf8c74dfa12d761de Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 12 May 2015 14:11:59 +1000 Subject: [PATCH] ctdb-tests: Add tickle test for external public address handling Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/tests/complex/35_cifs_external_tickle.sh | 102 ++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 ctdb/tests/complex/35_cifs_external_tickle.sh diff --git a/ctdb/tests/complex/35_cifs_external_tickle.sh b/ctdb/tests/complex/35_cifs_external_tickle.sh new file mode 100755 index 00000000000..fabe81b5c0a --- /dev/null +++ b/ctdb/tests/complex/35_cifs_external_tickle.sh @@ -0,0 +1,102 @@ +#!/bin/bash + +test_info() +{ + cat </dev/null 2>&1" + +wait_until_get_src_socket "tcp" "${test_ip}:${test_port}" $nc_pid "nc" +src_socket="$out" +echo "Source socket is $src_socket" + +# This should happen as soon as connection is up... but unless we wait +# we sometimes beat the registration. +echo "Checking if CIFS connection is tracked by CTDB..." +wait_until 10 check_tickles $test_node $test_ip $test_port $src_socket +echo "$out" + +if [ "${out/SRC: ${src_socket} /}" != "$out" ] ; then + echo "GOOD: CIFS connection tracked OK by CTDB." +else + echo "BAD: Socket not tracked by CTDB." + testfailures=1 +fi + +tcptickle_sniff_start $src_socket "${test_ip}:${test_port}" + +echo "Moving $test_ip from $test_node to $to_node" +try_command_on_node $test_node ip addr del "${test_ip}/${mask}" dev "$iface" +try_command_on_node $to_node ip addr add "${test_ip}/${mask}" dev "$iface" +try_command_on_node $to_node ctdb moveip "$test_ip" "$to_node" + +wait_until_ips_are_on_node "$to_node" "$test_ip" + +tcptickle_sniff_wait_show -- 2.11.4.GIT