Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions cts/cts-fencing.in
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,35 @@ class Tests(object):
test.add_stonith_neg_log_pattern("does not advertise support for 'reboot', performing 'off'")
test.add_stonith_log_pattern("with device 'true1' returned: 0 (OK)")

# make sure enforced fencing delay is applied only for the first device in the first level
for test_type in test_types:
if test_type["use_cpg"] == 0:
continue

test = self.new_test("%s_topology_delay" % test_type["prefix"],
"Verify enforced fencing delay is applied only for the first device in the first level.",
test_type["use_cpg"])
test.add_cmd("stonith_admin",
"--output-as=xml -R true1 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")
test.add_cmd("stonith_admin",
"--output-as=xml -R false1 -a fence_dummy -o \"mode=fail\" -o \"pcmk_host_list=node1 node2 node3\"")
test.add_cmd("stonith_admin",
"--output-as=xml -R true2 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")
test.add_cmd("stonith_admin",
"--output-as=xml -R true3 -a fence_dummy -o \"mode=pass\" -o \"pcmk_host_list=node1 node2 node3\"")

test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 1 -v true1")
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 1 -v false1")
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 2 -v true2")
test.add_cmd("stonith_admin", "--output-as=xml -r node3 -i 2 -v true3")

test.add_cmd("stonith_admin", "--output-as=xml -F node3 --delay 1")

test.add_stonith_log_pattern("Delaying 'off' action targeting node3 on true1 for enforced 1s")
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on false1")
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on true2")
test.add_stonith_neg_log_pattern("Delaying 'off' action targeting node3 on true3")

def build_nodeid_tests(self):
""" Register tests that use a corosync node id """

Expand Down
1 change: 1 addition & 0 deletions cts/cts-scheduler.in
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ TESTS = [
[ "order-first-probes",
"cl#5301 - respect order constraints when relevant resources are being probed" ],
[ "concurrent-fencing", "Allow performing fencing operations in parallel" ],
[ "priority-fencing-delay", "Delay fencing targeting the more significant node" ],
],
[
[ "systemhealth1", "System Health () #1" ],
Expand Down
109 changes: 109 additions & 0 deletions cts/scheduler/priority-fencing-delay.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
digraph "g" {
"R-lxc-01_kiff-01_monitor_10000 kiff-02" [ style=bold color="green" fontcolor="black"]
"R-lxc-01_kiff-01_start_0 kiff-02" -> "R-lxc-01_kiff-01_monitor_10000 kiff-02" [ style = bold]
"R-lxc-01_kiff-01_start_0 kiff-02" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"R-lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"R-lxc-01_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
"R-lxc-01_kiff-01_stop_0 kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"R-lxc-01_kiff-01_stop_0 kiff-01" -> "shared0-clone_stop_0" [ style = bold]
"R-lxc-01_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"R-lxc-02_kiff-01_monitor_10000 kiff-02" [ style=bold color="green" fontcolor="black"]
"R-lxc-02_kiff-01_start_0 kiff-02" -> "R-lxc-02_kiff-01_monitor_10000 kiff-02" [ style = bold]
"R-lxc-02_kiff-01_start_0 kiff-02" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"R-lxc-02_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "shared0-clone_stop_0" [ style = bold]
"R-lxc-02_kiff-01_stop_0 kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"R-lxc-02_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"clvmd-clone_stop_0" -> "clvmd-clone_stopped_0" [ style = bold]
"clvmd-clone_stop_0" -> "clvmd_stop_0 kiff-01" [ style = bold]
"clvmd-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
"clvmd-clone_stopped_0" -> "dlm-clone_stop_0" [ style = bold]
"clvmd-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
"clvmd_monitor_0 lxc-01_kiff-02" -> "clvmd-clone_stopped_0" [ style = bold]
"clvmd_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
"clvmd_monitor_0 lxc-02_kiff-02" -> "clvmd-clone_stopped_0" [ style = bold]
"clvmd_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
"clvmd_stop_0 kiff-01" -> "clvmd-clone_stopped_0" [ style = bold]
"clvmd_stop_0 kiff-01" -> "dlm_stop_0 kiff-01" [ style = bold]
"clvmd_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"dlm-clone_stop_0" -> "dlm-clone_stopped_0" [ style = bold]
"dlm-clone_stop_0" -> "dlm_stop_0 kiff-01" [ style = bold]
"dlm-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
"dlm-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
"dlm_monitor_0 lxc-01_kiff-02" -> "dlm-clone_stopped_0" [ style = bold]
"dlm_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
"dlm_monitor_0 lxc-02_kiff-02" -> "dlm-clone_stopped_0" [ style = bold]
"dlm_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
"dlm_stop_0 kiff-01" -> "dlm-clone_stopped_0" [ style = bold]
"dlm_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"fence-kiff-02_monitor_60000 kiff-02" [ style=bold color="green" fontcolor="black"]
"fence-kiff-02_start_0 kiff-02" -> "fence-kiff-02_monitor_60000 kiff-02" [ style = bold]
"fence-kiff-02_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
"fence-kiff-02_stop_0 kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
"fence-kiff-02_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"lxc-01_kiff-01_monitor_30000 kiff-02" [ style=bold color="green" fontcolor="black"]
"lxc-01_kiff-01_start_0 kiff-02" -> "lxc-01_kiff-01_monitor_30000 kiff-02" [ style = bold]
"lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_monitor_20000 lxc-01_kiff-01" [ style = bold]
"lxc-01_kiff-01_start_0 kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"lxc-01_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
"lxc-01_kiff-01_stop_0 kiff-01" -> "R-lxc-01_kiff-01_stop_0 kiff-01" [ style = bold]
"lxc-01_kiff-01_stop_0 kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"lxc-01_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"lxc-02_kiff-01_monitor_30000 kiff-02" [ style=bold color="green" fontcolor="black"]
"lxc-02_kiff-01_start_0 kiff-02" -> "lxc-02_kiff-01_monitor_30000 kiff-02" [ style = bold]
"lxc-02_kiff-01_start_0 kiff-02" [ style=bold color="green" fontcolor="black"]
"lxc-02_kiff-01_stop_0 kiff-01" -> "R-lxc-02_kiff-01_stop_0 kiff-01" [ style = bold]
"lxc-02_kiff-01_stop_0 kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"lxc-02_kiff-01_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"shared0-clone_stop_0" -> "shared0-clone_stopped_0" [ style = bold]
"shared0-clone_stop_0" -> "shared0_stop_0 kiff-01" [ style = bold]
"shared0-clone_stop_0" [ style=bold color="green" fontcolor="orange"]
"shared0-clone_stopped_0" -> "clvmd-clone_stop_0" [ style = bold]
"shared0-clone_stopped_0" [ style=bold color="green" fontcolor="orange"]
"shared0_monitor_0 lxc-01_kiff-02" -> "shared0-clone_stopped_0" [ style = bold]
"shared0_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
"shared0_monitor_0 lxc-02_kiff-02" -> "shared0-clone_stopped_0" [ style = bold]
"shared0_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
"shared0_stop_0 kiff-01" -> "clvmd_stop_0 kiff-01" [ style = bold]
"shared0_stop_0 kiff-01" -> "shared0-clone_stopped_0" [ style = bold]
"shared0_stop_0 kiff-01" [ style=bold color="green" fontcolor="orange"]
"stonith 'reboot' kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' kiff-01" -> "R-lxc-01_kiff-01_stop_0 kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' kiff-01" -> "R-lxc-02_kiff-01_stop_0 kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "clvmd-clone_stop_0" [ style = bold]
"stonith 'reboot' kiff-01" -> "clvmd_stop_0 kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "dlm-clone_stop_0" [ style = bold]
"stonith 'reboot' kiff-01" -> "dlm_stop_0 kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "shared0-clone_stop_0" [ style = bold]
"stonith 'reboot' kiff-01" -> "shared0_stop_0 kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "stonith 'reboot' lxc-01_kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "stonith 'reboot' lxc-02_kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"stonith 'reboot' kiff-01" [ style=bold color="green" fontcolor="black"]
"stonith 'reboot' lxc-01_kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" -> "vm-fs_stop_0 lxc-01_kiff-01" [ style = bold]
"stonith 'reboot' lxc-01_kiff-01" [ style=bold color="green" fontcolor="orange"]
"stonith 'reboot' lxc-02_kiff-01" -> "R-lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" -> "R-lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" -> "fence-kiff-02_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" -> "lxc-01_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" -> "lxc-02_kiff-01_start_0 kiff-02" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"stonith 'reboot' lxc-02_kiff-01" [ style=bold color="green" fontcolor="orange"]
"vm-fs_monitor_0 lxc-01_kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"vm-fs_monitor_0 lxc-01_kiff-02" [ style=bold color="green" fontcolor="black"]
"vm-fs_monitor_0 lxc-02_kiff-02" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"vm-fs_monitor_0 lxc-02_kiff-02" [ style=bold color="green" fontcolor="black"]
"vm-fs_monitor_20000 lxc-01_kiff-01" [ style=bold color="green" fontcolor="black"]
"vm-fs_start_0 lxc-01_kiff-01" -> "vm-fs_monitor_20000 lxc-01_kiff-01" [ style = bold]
"vm-fs_start_0 lxc-01_kiff-01" [ style=bold color="green" fontcolor="black"]
"vm-fs_stop_0 lxc-01_kiff-01" -> "vm-fs_start_0 lxc-01_kiff-01" [ style = bold]
"vm-fs_stop_0 lxc-01_kiff-01" [ style=bold color="green" fontcolor="orange"]
}
Loading