File bug-938545_pacemaker-pengine-concurrent-fencing-test.patch of Package pacemaker.3577
commit c9b53ad91a5f3717a7b9b634089440606982dc3f
Author: Gao,Yan <ygao@suse.com>
Date: Thu Sep 10 14:19:51 2015 +0200
Test: pengine: Support concurrent fencing (regression test)
diff --git a/pengine/regression.sh b/pengine/regression.sh
index 7f73f92..81c7900 100755
--- a/pengine/regression.sh
+++ b/pengine/regression.sh
@@ -537,6 +537,8 @@ do_test honor_stonith_rsc_order3 "cl#5056- Honor order constraint, stonith clone
do_test honor_stonith_rsc_order4 "cl#5056- Honor order constraint, between two native stonith rscs."
do_test probe-timeout "cl#5099 - Default probe timeout"
+do_test concurrent-fencing "Allow performing fencing operations in parallel"
+
echo ""
do_test systemhealth1 "System Health () #1"
do_test systemhealth2 "System Health () #2"
diff --git a/pengine/test10/concurrent-fencing.dot b/pengine/test10/concurrent-fencing.dot
new file mode 100644
index 0000000..657fa6a
--- /dev/null
+++ b/pengine/test10/concurrent-fencing.dot
@@ -0,0 +1,13 @@
+digraph "g" {
+"all_stopped" [ style=bold color="green" fontcolor="orange"]
+"stonith 'reboot' node1" -> "stonith 'reboot' node2" [ style = bold]
+"stonith 'reboot' node1" -> "stonith_complete" [ style = bold]
+"stonith 'reboot' node1" [ style=bold color="green" fontcolor="black"]
+"stonith 'reboot' node2" -> "stonith_complete" [ style = bold]
+"stonith 'reboot' node2" [ style=bold color="green" fontcolor="black"]
+"stonith 'reboot' node3" -> "stonith 'reboot' node2" [ style = bold]
+"stonith 'reboot' node3" -> "stonith_complete" [ style = bold]
+"stonith 'reboot' node3" [ style=bold color="green" fontcolor="black"]
+"stonith_complete" -> "all_stopped" [ style = bold]
+"stonith_complete" [ style=bold color="green" fontcolor="orange"]
+}
diff --git a/pengine/test10/concurrent-fencing.exp b/pengine/test10/concurrent-fencing.exp
new file mode 100644
index 0000000..4c09b75
--- /dev/null
+++ b/pengine/test10/concurrent-fencing.exp
@@ -0,0 +1,63 @@
+<transition_graph cluster-delay="60s" stonith-timeout="60s" failed-stop-offset="INFINITY" failed-start-offset="INFINITY" transition_id="0">
+ <synapse id="0">
+ <action_set>
+ <crm_event id="5" operation="stonith" operation_key="stonith-node3-reboot" on_node="node3" on_node_uuid="uuid3">
+ <attributes CRM_meta_on_node="node3" CRM_meta_on_node_uuid="uuid3" CRM_meta_stonith_action="reboot" />
+ </crm_event>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="1">
+ <action_set>
+ <crm_event id="4" operation="stonith" operation_key="stonith-node2-reboot" on_node="node2" on_node_uuid="uuid2">
+ <attributes CRM_meta_on_node="node2" CRM_meta_on_node_uuid="uuid2" CRM_meta_op_no_wait="true" CRM_meta_stonith_action="reboot" />
+ </crm_event>
+ </action_set>
+ <inputs>
+ <trigger>
+ <crm_event id="3" operation="stonith" operation_key="stonith-node1-reboot" on_node="node1" on_node_uuid="uuid1"/>
+ </trigger>
+ <trigger>
+ <crm_event id="5" operation="stonith" operation_key="stonith-node3-reboot" on_node="node3" on_node_uuid="uuid3"/>
+ </trigger>
+ </inputs>
+ </synapse>
+ <synapse id="2">
+ <action_set>
+ <crm_event id="3" operation="stonith" operation_key="stonith-node1-reboot" on_node="node1" on_node_uuid="uuid1">
+ <attributes CRM_meta_on_node="node1" CRM_meta_on_node_uuid="uuid1" CRM_meta_stonith_action="reboot" />
+ </crm_event>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="3">
+ <action_set>
+ <pseudo_event id="2" operation="stonith_complete" operation_key="stonith_complete">
+ <attributes />
+ </pseudo_event>
+ </action_set>
+ <inputs>
+ <trigger>
+ <crm_event id="3" operation="stonith" operation_key="stonith-node1-reboot" on_node="node1" on_node_uuid="uuid1"/>
+ </trigger>
+ <trigger>
+ <crm_event id="4" operation="stonith" operation_key="stonith-node2-reboot" on_node="node2" on_node_uuid="uuid2"/>
+ </trigger>
+ <trigger>
+ <crm_event id="5" operation="stonith" operation_key="stonith-node3-reboot" on_node="node3" on_node_uuid="uuid3"/>
+ </trigger>
+ </inputs>
+ </synapse>
+ <synapse id="4">
+ <action_set>
+ <pseudo_event id="1" operation="all_stopped" operation_key="all_stopped">
+ <attributes />
+ </pseudo_event>
+ </action_set>
+ <inputs>
+ <trigger>
+ <pseudo_event id="2" operation="stonith_complete" operation_key="stonith_complete"/>
+ </trigger>
+ </inputs>
+ </synapse>
+</transition_graph>
diff --git a/pengine/test10/concurrent-fencing.scores b/pengine/test10/concurrent-fencing.scores
new file mode 100644
index 0000000..0322231
--- /dev/null
+++ b/pengine/test10/concurrent-fencing.scores
@@ -0,0 +1,7 @@
+Allocation scores:
+native_color: lsb_dummy allocation score on node1: 0
+native_color: lsb_dummy allocation score on node2: 0
+native_color: lsb_dummy allocation score on node3: 0
+native_color: stonith-1 allocation score on node1: 0
+native_color: stonith-1 allocation score on node2: 0
+native_color: stonith-1 allocation score on node3: 0
diff --git a/pengine/test10/concurrent-fencing.summary b/pengine/test10/concurrent-fencing.summary
new file mode 100644
index 0000000..10b2fde
--- /dev/null
+++ b/pengine/test10/concurrent-fencing.summary
@@ -0,0 +1,24 @@
+
+Current cluster status:
+Node node1 (uuid1): UNCLEAN (offline)
+Node node2 (uuid2): UNCLEAN (offline)
+Node node3 (uuid3): UNCLEAN (offline)
+
+ stonith-1 (stonith:dummy): Stopped
+ lsb_dummy (lsb:/usr/lib/heartbeat/cts/LSBDummy): Stopped
+
+Transition Summary:
+
+Executing cluster transition:
+ * Fencing node3 (reboot)
+ * Fencing node1 (reboot)
+ * Fencing node2 (reboot)
+ * Pseudo action: stonith_complete
+ * Pseudo action: all_stopped
+
+Revised cluster status:
+OFFLINE: [ node1 node2 node3 ]
+
+ stonith-1 (stonith:dummy): Stopped
+ lsb_dummy (lsb:/usr/lib/heartbeat/cts/LSBDummy): Stopped
+
diff --git a/pengine/test10/concurrent-fencing.xml b/pengine/test10/concurrent-fencing.xml
new file mode 100644
index 0000000..e769425
--- /dev/null
+++ b/pengine/test10/concurrent-fencing.xml
@@ -0,0 +1,28 @@
+<cib admin_epoch="0" epoch="1" num_updates="1" dc-uuid="uuid2" have-quorum="false" remote-tls-port="0" validate-with="pacemaker-1.0" cib-last-written="Fri Jul 13 13:51:13 2012">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="nvpair.id21835" name="stonith-enabled" value="true"/>
+ <nvpair id="nvpair.id21844" name="no-quorum-policy" value="ignore"/>
+ <nvpair id="nvpair.id21845" name="concurrent-fencing" value="true"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes>
+ <node id="uuid1" uname="node1" type="member"/>
+ <node id="uuid2" uname="node2" type="member"/>
+ <node id="uuid3" uname="node3" type="member"/>
+ </nodes>
+ <resources>
+ <primitive id="stonith-1" class="stonith" type="dummy"/>
+ <primitive id="lsb_dummy" class="lsb" type="/usr/lib/heartbeat/cts/LSBDummy">
+ <meta_attributes id="primitive-lsb_dummy.meta"/>
+ </primitive>
+ </resources>
+ <constraints/>
+ </configuration>
+ <status>
+ <node_state id="uuid1" uname="node1" crmd="online" join="member" expected="member" in_ccm="false"/>
+ <node_state id="uuid2" uname="node2" crmd="online" join="member" expected="member" in_ccm="false"/>
+ <node_state id="uuid3" uname="node3" crmd="online" join="member" expected="member" in_ccm="false"/>
+ </status>
+</cib>