winbindd_cm: Pass cm_open_connection the need_rw_dc flag
[Samba.git] / ctdb / tests / complex / 41_failover_ping_discrete.sh
blob22780c40251270db0b5b7f44ae5ba73d3e0bfb58
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify that it is possible to ping a public address after disabling a node.
8 We ping a public IP, disable the node hosting it and then ping the
9 public IP again.
11 Prerequisites:
13 * An active CTDB cluster with at least 2 nodes with public addresses.
15 * Test must be run on a real or virtual cluster rather than against
16 local daemons.
18 * Test must not be run from a cluster node.
20 Steps:
22 1. Verify that the cluster is healthy.
23 2. Select a public address and its corresponding node.
24 3. Send a single ping request packet to the selected public address.
25 4. Disable the selected node.
26 5. Send another single ping request packet to the selected public address.
28 Expected results:
30 * When a node is disabled the public address fails over and the
31 address is still pingable.
32 EOF
35 . "${TEST_SCRIPTS_DIR}/integration.bash"
37 set -e
39 ctdb_test_init "$@"
41 ctdb_test_check_real_cluster
43 cluster_is_healthy
45 # Reset configuration
46 ctdb_restart_when_done
48 select_test_node_and_ips
50 echo "Removing ${test_ip} from the local neighbor table..."
51 ip neigh flush "$test_prefix" >/dev/null 2>&1 || true
53 echo "Pinging ${test_ip}..."
54 ping_wrapper -q -n -c 1 $test_ip
56 gratarp_sniff_start
58 echo "Disabling node $test_node"
59 try_command_on_node 1 $CTDB disable -n $test_node
60 wait_until_node_has_status $test_node disabled
62 gratarp_sniff_wait_show
64 echo "Removing ${test_ip} from the local neighbor table again..."
65 ip neigh flush "$test_prefix" >/dev/null 2>&1 || true
67 echo "Pinging ${test_ip} again..."
68 ping_wrapper -q -n -c 1 $test_ip