diff --git a/cts/cts-fencing.in b/cts/cts-fencing.in index 2d9999ca01a..239319cb169 100644 --- a/cts/cts-fencing.in +++ b/cts/cts-fencing.in @@ -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 """