ctdb-tests: Make the fake log timestamp string easy to modify
[vlendec/samba-autobuild/.git] / ctdb / tests / takeover / lcp2.031.sh
1 #!/bin/sh
2
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
4
5 define_test "12+4 IPs, 4 nodes, 3 -> 4 healthy"
6
7 export CTDB_TEST_LOGLEVEL=4
8
9 required_result <<EOF
10 ${TEST_DATE_STAMP} ----------------------------------------
11 ${TEST_DATE_STAMP} CONSIDERING MOVES (UNASSIGNED)
12 ${TEST_DATE_STAMP} ----------------------------------------
13 ${TEST_DATE_STAMP}+++++++++++++++++++++++++++++++++++++++++
14 ${TEST_DATE_STAMP}Selecting most imbalanced node from:
15 ${TEST_DATE_STAMP} 0 [0]
16 ${TEST_DATE_STAMP} 1 [181370]
17 ${TEST_DATE_STAMP} 2 [128630]
18 ${TEST_DATE_STAMP} 3 [128881]
19 ${TEST_DATE_STAMP} ----------------------------------------
20 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 1 [181370]
21 ${TEST_DATE_STAMP} 1 [-64566] -> 130.216.30.178 -> 0 [+0]
22 ${TEST_DATE_STAMP} 1 [-64566] -> 130.216.30.176 -> 0 [+0]
23 ${TEST_DATE_STAMP} 1 [-64315] -> 130.216.30.175 -> 0 [+0]
24 ${TEST_DATE_STAMP} 1 [-64315] -> 130.216.30.171 -> 0 [+0]
25 ${TEST_DATE_STAMP} 1 [-52489] -> 10.19.99.253 -> 0 [+0]
26 ${TEST_DATE_STAMP} 1 [-52489] -> 10.19.99.250 -> 0 [+0]
27 ${TEST_DATE_STAMP} ----------------------------------------
28 ${TEST_DATE_STAMP}1 [-64566] -> 130.216.30.178 -> 0 [+0]
29 ${TEST_DATE_STAMP}+++++++++++++++++++++++++++++++++++++++++
30 ${TEST_DATE_STAMP}Selecting most imbalanced node from:
31 ${TEST_DATE_STAMP} 0 [0]
32 ${TEST_DATE_STAMP} 1 [116804]
33 ${TEST_DATE_STAMP} 2 [128630]
34 ${TEST_DATE_STAMP} 3 [128881]
35 ${TEST_DATE_STAMP} ----------------------------------------
36 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 3 [128881]
37 ${TEST_DATE_STAMP} 3 [-55099] -> 130.216.30.180 -> 0 [+15625]
38 ${TEST_DATE_STAMP} 3 [-55099] -> 130.216.30.177 -> 0 [+15876]
39 ${TEST_DATE_STAMP} 3 [-55350] -> 130.216.30.174 -> 0 [+15129]
40 ${TEST_DATE_STAMP} 3 [-55350] -> 130.216.30.173 -> 0 [+15129]
41 ${TEST_DATE_STAMP} 3 [-36864] -> 10.19.99.252 -> 0 [+9216]
42 ${TEST_DATE_STAMP} ----------------------------------------
43 ${TEST_DATE_STAMP}3 [-55350] -> 130.216.30.174 -> 0 [+15129]
44 ${TEST_DATE_STAMP}+++++++++++++++++++++++++++++++++++++++++
45 ${TEST_DATE_STAMP}Selecting most imbalanced node from:
46 ${TEST_DATE_STAMP} 0 [15129]
47 ${TEST_DATE_STAMP} 1 [116804]
48 ${TEST_DATE_STAMP} 2 [128630]
49 ${TEST_DATE_STAMP} 3 [73531]
50 ${TEST_DATE_STAMP} ----------------------------------------
51 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 2 [128630]
52 ${TEST_DATE_STAMP} 2 [-55099] -> 130.216.30.181 -> 0 [+30754]
53 ${TEST_DATE_STAMP} 2 [-55099] -> 130.216.30.179 -> 0 [+31258]
54 ${TEST_DATE_STAMP} 2 [-55099] -> 130.216.30.172 -> 0 [+31005]
55 ${TEST_DATE_STAMP} 2 [-55099] -> 130.216.30.170 -> 0 [+30754]
56 ${TEST_DATE_STAMP} 2 [-36864] -> 10.19.99.251 -> 0 [+18432]
57 ${TEST_DATE_STAMP} ----------------------------------------
58 ${TEST_DATE_STAMP}2 [-55099] -> 130.216.30.181 -> 0 [+30754]
59 ${TEST_DATE_STAMP}+++++++++++++++++++++++++++++++++++++++++
60 ${TEST_DATE_STAMP}Selecting most imbalanced node from:
61 ${TEST_DATE_STAMP} 0 [45883]
62 ${TEST_DATE_STAMP} 1 [116804]
63 ${TEST_DATE_STAMP} 2 [73531]
64 ${TEST_DATE_STAMP} 3 [73531]
65 ${TEST_DATE_STAMP} ----------------------------------------
66 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 1 [116804]
67 ${TEST_DATE_STAMP} 1 [-48690] -> 130.216.30.176 -> 0 [+46630]
68 ${TEST_DATE_STAMP} 1 [-49186] -> 130.216.30.175 -> 0 [+46387]
69 ${TEST_DATE_STAMP} 1 [-49186] -> 130.216.30.171 -> 0 [+45883]
70 ${TEST_DATE_STAMP} 1 [-43273] -> 10.19.99.253 -> 0 [+27648]
71 ${TEST_DATE_STAMP} 1 [-43273] -> 10.19.99.250 -> 0 [+27648]
72 ${TEST_DATE_STAMP} ----------------------------------------
73 ${TEST_DATE_STAMP}1 [-43273] -> 10.19.99.253 -> 0 [+27648]
74 ${TEST_DATE_STAMP}+++++++++++++++++++++++++++++++++++++++++
75 ${TEST_DATE_STAMP}Selecting most imbalanced node from:
76 ${TEST_DATE_STAMP} 0 [73531]
77 ${TEST_DATE_STAMP} 1 [73531]
78 ${TEST_DATE_STAMP} 2 [73531]
79 ${TEST_DATE_STAMP} 3 [73531]
80 ${TEST_DATE_STAMP} ----------------------------------------
81 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 0 [73531]
82 ${TEST_DATE_STAMP} 0 [-39970] -> 130.216.30.181 -> 0 [+39970]
83 ${TEST_DATE_STAMP} 0 [-39970] -> 130.216.30.178 -> 0 [+39970]
84 ${TEST_DATE_STAMP} 0 [-39474] -> 130.216.30.174 -> 0 [+39474]
85 ${TEST_DATE_STAMP} 0 [-27648] -> 10.19.99.253 -> 0 [+27648]
86 ${TEST_DATE_STAMP} ----------------------------------------
87 ${TEST_DATE_STAMP} ----------------------------------------
88 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 1 [73531]
89 ${TEST_DATE_STAMP} 1 [-39474] -> 130.216.30.176 -> 0 [+55846]
90 ${TEST_DATE_STAMP} 1 [-39970] -> 130.216.30.175 -> 0 [+55603]
91 ${TEST_DATE_STAMP} 1 [-39970] -> 130.216.30.171 -> 0 [+55099]
92 ${TEST_DATE_STAMP} 1 [-27648] -> 10.19.99.250 -> 0 [+43273]
93 ${TEST_DATE_STAMP} ----------------------------------------
94 ${TEST_DATE_STAMP} ----------------------------------------
95 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 2 [73531]
96 ${TEST_DATE_STAMP} 2 [-39474] -> 130.216.30.179 -> 0 [+56099]
97 ${TEST_DATE_STAMP} 2 [-39970] -> 130.216.30.172 -> 0 [+55350]
98 ${TEST_DATE_STAMP} 2 [-39970] -> 130.216.30.170 -> 0 [+55099]
99 ${TEST_DATE_STAMP} 2 [-27648] -> 10.19.99.251 -> 0 [+43273]
100 ${TEST_DATE_STAMP} ----------------------------------------
101 ${TEST_DATE_STAMP} ----------------------------------------
102 ${TEST_DATE_STAMP} CONSIDERING MOVES FROM 3 [73531]
103 ${TEST_DATE_STAMP} 3 [-39970] -> 130.216.30.180 -> 0 [+56099]
104 ${TEST_DATE_STAMP} 3 [-39970] -> 130.216.30.177 -> 0 [+55846]
105 ${TEST_DATE_STAMP} 3 [-39474] -> 130.216.30.173 -> 0 [+55350]
106 ${TEST_DATE_STAMP} 3 [-27648] -> 10.19.99.252 -> 0 [+43777]
107 ${TEST_DATE_STAMP} ----------------------------------------
108 130.216.30.181 0
109 130.216.30.180 3
110 130.216.30.179 2
111 130.216.30.178 0
112 130.216.30.177 3
113 130.216.30.176 1
114 130.216.30.175 1
115 130.216.30.174 0
116 130.216.30.173 3
117 130.216.30.172 2
118 130.216.30.171 1
119 130.216.30.170 2
120 10.19.99.253 0
121 10.19.99.252 3
122 10.19.99.251 2
123 10.19.99.250 1
124 EOF
125
126 simple_test 0,0,0,0 <<EOF
127 10.19.99.250 1
128 10.19.99.251 2
129 10.19.99.252 3
130 10.19.99.253 1
131 130.216.30.170 2
132 130.216.30.171 1
133 130.216.30.172 2
134 130.216.30.173 3
135 130.216.30.174 3
136 130.216.30.175 1
137 130.216.30.176 1
138 130.216.30.177 3
139 130.216.30.178 1
140 130.216.30.179 2
141 130.216.30.180 3
142 130.216.30.181 2
143 EOF