Debian Codegraph @

ctdb/tests/UNIT/eventscripts/11.natgw.015.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "basic configuration, multiple transitions"
6
7 setup
8
9 echoscip-shell system . . echo. "*** Leader node..."
10
11 setup_ctdb_natgw <<EOF
12 192.168.1.21 leader
13 192.168.1.22
14 192.168.1.23
15 192.168.1.24
16 EOF
17
18 ok_null
19 simple_test_event "ipreallocated"
20
21 ok "default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 "
22 simple_test_command ip route show
23
24 ok_natgw_leader_ip_addr_show
25 simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE"
26
27 echoscip-shell system . . echo. "*** Follower node..."
28
29 setup_ctdb_natgw <<EOF
30 192.168.1.21
31 192.168.1.22 leader
32 192.168.1.23
33 192.168.1.24
34 EOF
35
36 ok_null
37 simple_test_event "ipreallocated"
38
39 ok "default via ${FAKE_CTDB_NATGW_LEADER} dev ethXXX metric 10 "
40 simple_test_command ip route show
41
42 ok_natgw_follower_ip_addr_show
43 simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE"
44
45 echoscip-shell system . . echo. "*** Leader node again..."
46
47 setup_ctdb_natgw <<EOF
48 192.168.1.21 leader
49 192.168.1.22
50 192.168.1.23
51 192.168.1.24
52 EOF
53
54 ok_null
55 simple_test_event "ipreallocated"
56
57 ok "default via ${CTDB_NATGW_DEFAULT_GATEWAY} dev ethXXX metric 10 "
58 simple_test_command ip route show
59
60 ok_natgw_leader_ip_addr_show
61 simple_test_command ip addr show "$CTDB_NATGW_PUBLIC_IFACE"