@@ -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
0 commit comments