Skip to content

Commit 3e73aef

Browse files
author
Ken Gaillot
authored
Merge pull request #2012 from gao-yan/priority-fencing-delay
Feature: priority-fencing-delay
2 parents e16e512 + b0b1710 commit 3e73aef

27 files changed

+1823
-82
lines changed

cts/cts-fencing.in

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,35 @@ class Tests(object):
11261126
test.add_stonith_neg_log_pattern("does not advertise support for 'reboot', performing 'off'")
11271127
test.add_stonith_log_pattern("with device 'true1' returned: 0 (OK)")
11281128

1129+
# make sure enforced fencing delay is applied only for the first device in the first level
1130+
for test_type in test_types:
1131+
if test_type["use_cpg"] == 0:
1132+
continue
1133+
1134+
test = self.new_test("%s_topology_delay" % test_type["prefix"],
1135+
"Verify enforced fencing delay is applied only for the first device in the first level.",
1136+
test_type["use_cpg"])
1137+
test.add_cmd("stonith_admin",
1138+
"--output-as=xml -R true1 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")
1139+
test.add_cmd("stonith_admin",
1140+
"--output-as=xml -R false1 -a fence_dummy -o \"mode=fail\" -o \"pcmk_host_list=node1 node2 node3\"")
1141+
test.add_cmd("stonith_admin",
1142+
"--output-as=xml -R true2 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")
1143+
test.add_cmd("stonith_admin",
1144+
"--output-as=xml -R true3 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")
1145+
1146+
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 1 -v true1")
1147+
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 1 -v false1")
1148+
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 2 -v true2")
1149+
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 2 -v true3")
1150+
1151+
test.add_cmd("stonith_admin", "--output-as=xml -F node3 --delay 1")
1152+
1153+
test.add_stonith_log_pattern("Delaying 'off' action targeting node3 on true1 for enforced 1s")
1154+
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on false1")
1155+
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on true2")
1156+
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on true3")
1157+
11291158
def build_nodeid_tests(self):
11301159
""" Register tests that use a corosync node id """
11311160

cts/cts-scheduler.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ TESTS = [
625625
[ "order-first-probes",
626626
"cl#5301 - respect order constraints when relevant resources are being probed" ],
627627
[ "concurrent-fencing", "Allow performing fencing operations in parallel" ],
628+
[ "priority-fencing-delay", "Delay fencing targeting the more significant node" ],
628629
],
629630
[
630631
[ "systemhealth1", "System Health () #1" ],
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
digraph "g" {
2+
"R-lxc-01_kiff-01_monitor_10000 kiff-02" [ style=bold color="green" fontcolor="black"]
3+
"R-lxc-01_kiff-01_start_0 kiff-02" -> "R-lxc-01_kiff-01_monitor_10000 kiff-02" [ style = bold]
4+
"R-lxc-01_kiff-01_start_0 kiff-02" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
5+
"R-lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
6+
"R-lxc-01_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
7+
"R-lxc-01_kiff-01_stop_0 kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
8+
"R-lxc-01_kiff-01_stop_0 kiff-01" -> "shared0-clone_stop_0" [ style = bold]
9+
"R-lxc-01_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
10+
"R-lxc-02_kiff-01_monitor_10000 kiff-02" [ style=bold color="green" fontcolor="black"]
11+
"R-lxc-02_kiff-01_start_0 kiff-02" -> "R-lxc-02_kiff-01_monitor_10000 kiff-02" [ style = bold]
12+
"R-lxc-02_kiff-01_start_0 kiff-02" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
13+
"R-lxc-02_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
14+
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
15+
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "shared0-clone_stop_0" [ style = bold]
16+
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
17+
"R-lxc-02_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
18+
"clvmd-clone_stop_0" -> "clvmd-clone_stopped_0" [ style = bold]
19+
"clvmd-clone_stop_0" -> "clvmd_stop_0 kiff-01" [ style = bold]
20+
"clvmd-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
21+
"clvmd-clone_stopped_0" -> "dlm-clone_stop_0" [ style = bold]
22+
"clvmd-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
23+
"clvmd_monitor_0 lxc-01_kiff-02" -> "clvmd-clone_stopped_0" [ style = bold]
24+
"clvmd_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
25+
"clvmd_monitor_0 lxc-02_kiff-02" -> "clvmd-clone_stopped_0" [ style = bold]
26+
"clvmd_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
27+
"clvmd_stop_0 kiff-01" -> "clvmd-clone_stopped_0" [ style = bold]
28+
"clvmd_stop_0 kiff-01" -> "dlm_stop_0 kiff-01" [ style = bold]
29+
"clvmd_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
30+
"dlm-clone_stop_0" -> "dlm-clone_stopped_0" [ style = bold]
31+
"dlm-clone_stop_0" -> "dlm_stop_0 kiff-01" [ style = bold]
32+
"dlm-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
33+
"dlm-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
34+
"dlm_monitor_0 lxc-01_kiff-02" -> "dlm-clone_stopped_0" [ style = bold]
35+
"dlm_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
36+
"dlm_monitor_0 lxc-02_kiff-02" -> "dlm-clone_stopped_0" [ style = bold]
37+
"dlm_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
38+
"dlm_stop_0 kiff-01" -> "dlm-clone_stopped_0" [ style = bold]
39+
"dlm_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
40+
"fence-kiff-02_monitor_60000 kiff-02" [ style=bold color="green" fontcolor="black"]
41+
"fence-kiff-02_start_0 kiff-02" -> "fence-kiff-02_monitor_60000 kiff-02" [ style = bold]
42+
"fence-kiff-02_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
43+
"fence-kiff-02_stop_0 kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
44+
"fence-kiff-02_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
45+
"lxc-01_kiff-01_monitor_30000 kiff-02" [ style=bold color="green" fontcolor="black"]
46+
"lxc-01_kiff-01_start_0 kiff-02" -> "lxc-01_kiff-01_monitor_30000 kiff-02" [ style = bold]
47+
"lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_monitor_20000 lxc-01_kiff-01" [ style = bold]
48+
"lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
49+
"lxc-01_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
50+
"lxc-01_kiff-01_stop_0 kiff-01" -> "R-lxc-01_kiff-01_stop_0 kiff-01" [ style = bold]
51+
"lxc-01_kiff-01_stop_0 kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
52+
"lxc-01_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
53+
"lxc-02_kiff-01_monitor_30000 kiff-02" [ style=bold color="green" fontcolor="black"]
54+
"lxc-02_kiff-01_start_0 kiff-02" -> "lxc-02_kiff-01_monitor_30000 kiff-02" [ style = bold]
55+
"lxc-02_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
56+
"lxc-02_kiff-01_stop_0 kiff-01" -> "R-lxc-02_kiff-01_stop_0 kiff-01" [ style = bold]
57+
"lxc-02_kiff-01_stop_0 kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
58+
"lxc-02_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
59+
"shared0-clone_stop_0" -> "shared0-clone_stopped_0" [ style = bold]
60+
"shared0-clone_stop_0" -> "shared0_stop_0 kiff-01" [ style = bold]
61+
"shared0-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
62+
"shared0-clone_stopped_0" -> "clvmd-clone_stop_0" [ style = bold]
63+
"shared0-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
64+
"shared0_monitor_0 lxc-01_kiff-02" -> "shared0-clone_stopped_0" [ style = bold]
65+
"shared0_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
66+
"shared0_monitor_0 lxc-02_kiff-02" -> "shared0-clone_stopped_0" [ style = bold]
67+
"shared0_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
68+
"shared0_stop_0 kiff-01" -> "clvmd_stop_0 kiff-01" [ style = bold]
69+
"shared0_stop_0 kiff-01" -> "shared0-clone_stopped_0" [ style = bold]
70+
"shared0_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
71+
"stonith 'reboot' kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
72+
"stonith 'reboot' kiff-01" -> "R-lxc-01_kiff-01_stop_0 kiff-01" [ style = bold]
73+
"stonith 'reboot' kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
74+
"stonith 'reboot' kiff-01" -> "R-lxc-02_kiff-01_stop_0 kiff-01" [ style = bold]
75+
"stonith 'reboot' kiff-01" -> "clvmd-clone_stop_0" [ style = bold]
76+
"stonith 'reboot' kiff-01" -> "clvmd_stop_0 kiff-01" [ style = bold]
77+
"stonith 'reboot' kiff-01" -> "dlm-clone_stop_0" [ style = bold]
78+
"stonith 'reboot' kiff-01" -> "dlm_stop_0 kiff-01" [ style = bold]
79+
"stonith 'reboot' kiff-01" -> "shared0-clone_stop_0" [ style = bold]
80+
"stonith 'reboot' kiff-01" -> "shared0_stop_0 kiff-01" [ style = bold]
81+
"stonith 'reboot' kiff-01" -> "stonith 'reboot' lxc-01_kiff-01" [ style = bold]
82+
"stonith 'reboot' kiff-01" -> "stonith 'reboot' lxc-02_kiff-01" [ style = bold]
83+
"stonith 'reboot' kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
84+
"stonith 'reboot' kiff-01" [ style=bold color="green" fontcolor="black"]
85+
"stonith 'reboot' lxc-01_kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
86+
"stonith 'reboot' lxc-01_kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
87+
"stonith 'reboot' lxc-01_kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
88+
"stonith 'reboot' lxc-01_kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
89+
"stonith 'reboot' lxc-01_kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
90+
"stonith 'reboot' lxc-01_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
91+
"stonith 'reboot' lxc-01_kiff-01" -> "vm-fs_stop_0 lxc-01_kiff-01" [ style = bold]
92+
"stonith 'reboot' lxc-01_kiff-01" [ style=bold color="green" fontcolor="orange"]
93+
"stonith 'reboot' lxc-02_kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
94+
"stonith 'reboot' lxc-02_kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
95+
"stonith 'reboot' lxc-02_kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
96+
"stonith 'reboot' lxc-02_kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
97+
"stonith 'reboot' lxc-02_kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
98+
"stonith 'reboot' lxc-02_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
99+
"stonith 'reboot' lxc-02_kiff-01" [ style=bold color="green" fontcolor="orange"]
100+
"vm-fs_monitor_0 lxc-01_kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
101+
"vm-fs_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
102+
"vm-fs_monitor_0 lxc-02_kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
103+
"vm-fs_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
104+
"vm-fs_monitor_20000 lxc-01_kiff-01" [ style=bold color="green" fontcolor="black"]
105+
"vm-fs_start_0 lxc-01_kiff-01" -> "vm-fs_monitor_20000 lxc-01_kiff-01" [ style = bold]
106+
"vm-fs_start_0 lxc-01_kiff-01" [ style=bold color="green" fontcolor="black"]
107+
"vm-fs_stop_0 lxc-01_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
108+
"vm-fs_stop_0 lxc-01_kiff-01" [ style=bold color="green" fontcolor="orange"]
109+
}

0 commit comments

Comments
 (0)