ctdb-ipalloc: Pass extra data to IP allocation state initialisation
[vlendec/samba-autobuild/.git] / ctdb / tests / tool / ctdb.lvs.005.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "3 nodes, all LVS, all unhealthy"
6
7 setup_lvs <<EOF
8 192.168.20.41
9 192.168.20.42
10 192.168.20.43
11 EOF
12
13 ctdb_state="\
14 NODEMAP
15 0       192.168.20.41   0x2     CURRENT RECMASTER
16 1       192.168.20.42   0x2
17 2       192.168.20.43   0x2
18
19 IFACES
20 :Name:LinkStatus:References:
21 :eth2:1:2:
22 :eth1:1:4:
23
24 VNNMAP
25 654321
26 0
27 1
28 2
29 "
30
31 #####
32
33 required_result 0 <<EOF
34 0
35 EOF
36
37 simple_test master <<EOF
38 $ctdb_state
39 EOF
40
41 #####
42
43 required_result 0 <<EOF
44 0 192.168.20.41
45 1 192.168.20.42
46 2 192.168.20.43
47 EOF
48
49 simple_test list <<EOF
50 $ctdb_state
51 EOF
52
53 #####
54
55 required_result 0 <<EOF
56 pnn:0 192.168.20.41    UNHEALTHY (THIS NODE)
57 pnn:1 192.168.20.42    UNHEALTHY
58 pnn:2 192.168.20.43    UNHEALTHY
59 EOF
60
61 simple_test status <<EOF
62 $ctdb_state
63 EOF