summaryrefslogtreecommitdiff
path: root/ctdb/tests/INTEGRATION/failover/pubips.013.failover_noop.sh
blob: 1c13a3ce3c2c12bcabdb313a8765e840f346c33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash

# Check that CTDB operates correctly if:

# * failover is disabled; or
# * there are 0 public IPs configured

. "${TEST_SCRIPTS_DIR}/integration.bash"

set -e

ctdb_test_skip_on_cluster

echo "Starting CTDB with failover disabled..."
ctdb_test_init -F

cluster_is_healthy

echo "Getting IP allocation..."
try_command_on_node -v any "$CTDB ip all | tail -n +2"

while read ip pnn ; do
	if [ "$pnn" != "-1" ] ; then
		die "BAD: IP address ${ip} is assigned to node ${pnn}"
	fi
done <"$outfile"

echo "GOOD: All IP addresses are unassigned"

echo "----------------------------------------"

echo "Starting CTDB with an empty public addresses configuration..."
ctdb_test_init -P /dev/null

cluster_is_healthy

echo "Trying explicit ipreallocate..."
try_command_on_node any $CTDB ipreallocate

echo "Good, that seems to work!"
echo