commit 4a95897ab5b668f35a64e5d3818046adcafd3897
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Thu Jun 16 13:49:40 2016 -0500

    Test: pengine: add regression test for start-then-stop + unfencing

Index: pacemaker/pengine/regression.sh
===================================================================
--- pacemaker.orig/pengine/regression.sh
+++ pacemaker/pengine/regression.sh
@@ -518,6 +518,7 @@ do_test bug-5069-op-disabled "Test on-fa
 do_test obsolete-lrm-resource "cl#5115 - Do not use obsolete lrm_resource sections"
 do_test expire-non-blocked-failure "Ignore failure-timeout only if the failed operation has on-fail=block"
 do_test asymmetrical-order-move "Respect asymmetrical ordering when trying to move resources"
+do_test start-then-stop-with-unfence "Avoid graph loop with start-then-stop constraint plus unfencing"
 
 do_test ignore_stonith_rsc_order1 "cl#5056- Ignore order constraint between stonith and non-stonith rsc."
 do_test ignore_stonith_rsc_order2 "cl#5056- Ignore order constraint with group rsc containing mixed stonith and non-stonith."
Index: pacemaker/pengine/test10/start-then-stop-with-unfence.dot
===================================================================
--- /dev/null
+++ pacemaker/pengine/test10/start-then-stop-with-unfence.dot
@@ -0,0 +1,34 @@
+digraph "g" {
+"all_stopped" [ style=bold color="green" fontcolor="orange"]
+"ip1_monitor_10000 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"ip1_start_0 rhel7-node1.example.com" -> "ip1_monitor_10000 rhel7-node1.example.com" [ style = bold]
+"ip1_start_0 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"ip1_stop_0 rhel7-node2.example.com" -> "all_stopped" [ style = bold]
+"ip1_stop_0 rhel7-node2.example.com" -> "ip1_start_0 rhel7-node1.example.com" [ style = bold]
+"ip1_stop_0 rhel7-node2.example.com" [ style=bold color="green" fontcolor="black"]
+"jrummy-clone_running_0" -> "ip1_stop_0 rhel7-node2.example.com" [ style = bold]
+"jrummy-clone_running_0" [ style=bold color="green" fontcolor="orange"]
+"jrummy-clone_start_0" -> "jrummy-clone_running_0" [ style = bold]
+"jrummy-clone_start_0" -> "jrummy_start_0 rhel7-node1.example.com" [ style = bold]
+"jrummy-clone_start_0" [ style=bold color="green" fontcolor="orange"]
+"jrummy_monitor_10000 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"jrummy_start_0 rhel7-node1.example.com" -> "jrummy-clone_running_0" [ style = bold]
+"jrummy_start_0 rhel7-node1.example.com" -> "jrummy_monitor_10000 rhel7-node1.example.com" [ style = bold]
+"jrummy_start_0 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"mpath-node1_monitor_0 rhel7-node1.example.com" -> "mpath-node1_start_0 rhel7-node1.example.com" [ style = bold]
+"mpath-node1_monitor_0 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"mpath-node1_monitor_60000 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"mpath-node1_start_0 rhel7-node1.example.com" -> "mpath-node1_monitor_60000 rhel7-node1.example.com" [ style = bold]
+"mpath-node1_start_0 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"mpath-node2_monitor_0 rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"probe_complete rhel7-node1.example.com" -> "probe_complete" [ style = bold]
+"probe_complete rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+"probe_complete" -> "ip1_stop_0 rhel7-node2.example.com" [ style = bold]
+"probe_complete" -> "mpath-node1_start_0 rhel7-node1.example.com" [ style = bold]
+"probe_complete" [ style=bold color="green" fontcolor="orange"]
+"stonith 'on' rhel7-node1.example.com" -> "ip1_start_0 rhel7-node1.example.com" [ style = bold]
+"stonith 'on' rhel7-node1.example.com" -> "jrummy_start_0 rhel7-node1.example.com" [ style = bold]
+"stonith 'on' rhel7-node1.example.com" -> "mpath-node1_monitor_0 rhel7-node1.example.com" [ style = bold]
+"stonith 'on' rhel7-node1.example.com" -> "mpath-node2_monitor_0 rhel7-node1.example.com" [ style = bold]
+"stonith 'on' rhel7-node1.example.com" [ style=bold color="green" fontcolor="black"]
+}
Index: pacemaker/pengine/test10/start-then-stop-with-unfence.exp
===================================================================
--- /dev/null
+++ pacemaker/pengine/test10/start-then-stop-with-unfence.exp
@@ -0,0 +1,194 @@
+<transition_graph cluster-delay="60s" stonith-timeout="60s" failed-stop-offset="INFINITY" failed-start-offset="INFINITY"  transition_id="0">
+  <synapse id="0" priority="1000000">
+    <action_set>
+      <rsc_op id="10" operation="monitor" operation_key="mpath-node2_monitor_0" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="mpath-node2" class="stonith" type="fence_mpath"/>
+        <attributes CRM_meta_op_target_rc="7" CRM_meta_timeout="20000"  devices="/dev/mapper/clustPVa" key="1234" pcmk_host_list="rhel7-node2.example.com"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <crm_event id="6" operation="stonith" operation_key="stonith-rhel7-node1.example.com-on" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="1">
+    <action_set>
+      <rsc_op id="16" operation="monitor" operation_key="mpath-node1_monitor_60000" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="mpath-node1" class="stonith" type="fence_mpath"/>
+        <attributes CRM_meta_interval="60000" CRM_meta_name="monitor" CRM_meta_timeout="20000"  devices="/dev/mapper/clustPVa" key="1233" pcmk_host_list="rhel7-node1.example.com"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="15" operation="start" operation_key="mpath-node1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="2">
+    <action_set>
+      <rsc_op id="15" operation="start" operation_key="mpath-node1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="mpath-node1" class="stonith" type="fence_mpath"/>
+        <attributes CRM_meta_timeout="20000"  devices="/dev/mapper/clustPVa" key="1233" pcmk_host_list="rhel7-node1.example.com"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="8" operation="probe_complete" operation_key="probe_complete"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="11" operation="monitor" operation_key="mpath-node1_monitor_0" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="3" priority="1000000">
+    <action_set>
+      <rsc_op id="11" operation="monitor" operation_key="mpath-node1_monitor_0" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="mpath-node1" class="stonith" type="fence_mpath"/>
+        <attributes CRM_meta_op_target_rc="7" CRM_meta_timeout="20000"  devices="/dev/mapper/clustPVa" key="1233" pcmk_host_list="rhel7-node1.example.com"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <crm_event id="6" operation="stonith" operation_key="stonith-rhel7-node1.example.com-on" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="4">
+    <action_set>
+      <rsc_op id="19" operation="monitor" operation_key="ip1_monitor_10000" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="ip1" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_interval="10000" CRM_meta_name="monitor" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.143.161"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="18" operation="start" operation_key="ip1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="5">
+    <action_set>
+      <rsc_op id="18" operation="start" operation_key="ip1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="ip1" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_name="start" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.143.161"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <crm_event id="6" operation="stonith" operation_key="stonith-rhel7-node1.example.com-on" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="17" operation="stop" operation_key="ip1_stop_0" on_node="rhel7-node2.example.com" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="6">
+    <action_set>
+      <rsc_op id="17" operation="stop" operation_key="ip1_stop_0" on_node="rhel7-node2.example.com" on_node_uuid="2">
+        <primitive id="ip1" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_name="stop" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.143.161"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="8" operation="probe_complete" operation_key="probe_complete"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="27" operation="running" operation_key="jrummy-clone_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="7">
+    <action_set>
+      <rsc_op id="25" operation="monitor" operation_key="jrummy_monitor_10000" internal_operation_key="jrummy:1_monitor_10000" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="jrummy" long-id="jrummy:1" class="ocf" provider="heartbeat" type="jrummyRA"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_interval="10000" CRM_meta_name="monitor" CRM_meta_notify="false" CRM_meta_timeout="30000" />
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="24" operation="start" operation_key="jrummy_start_0" internal_operation_key="jrummy:1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="8">
+    <action_set>
+      <rsc_op id="24" operation="start" operation_key="jrummy_start_0" internal_operation_key="jrummy:1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <primitive id="jrummy" long-id="jrummy:1" class="ocf" provider="heartbeat" type="jrummyRA"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_name="start" CRM_meta_notify="false" CRM_meta_timeout="300000" />
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <crm_event id="6" operation="stonith" operation_key="stonith-rhel7-node1.example.com-on" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="start" operation_key="jrummy-clone_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="9" priority="1000000">
+    <action_set>
+      <pseudo_event id="27" operation="running" operation_key="jrummy-clone_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_notify="false" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="24" operation="start" operation_key="jrummy_start_0" internal_operation_key="jrummy:1_start_0" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="start" operation_key="jrummy-clone_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="10">
+    <action_set>
+      <pseudo_event id="26" operation="start" operation_key="jrummy-clone_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_notify="false" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="11" priority="1000000">
+    <action_set>
+      <rsc_op id="9" operation="probe_complete" operation_key="probe_complete-rhel7-node1.example.com" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <attributes CRM_meta_op_no_wait="true" />
+      </rsc_op>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="12">
+    <action_set>
+      <pseudo_event id="8" operation="probe_complete" operation_key="probe_complete">
+        <attributes />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="9" operation="probe_complete" operation_key="probe_complete-rhel7-node1.example.com" on_node="rhel7-node1.example.com" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="13">
+    <action_set>
+      <crm_event id="6" operation="stonith" operation_key="stonith-rhel7-node1.example.com-on" on_node="rhel7-node1.example.com" on_node_uuid="1">
+        <attributes CRM_meta_on_node="rhel7-node1.example.com" CRM_meta_on_node_uuid="1" CRM_meta_probe_complete="true" CRM_meta_shutdown="0" CRM_meta_stonith_action="on" />
+      </crm_event>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="14">
+    <action_set>
+      <pseudo_event id="5" operation="all_stopped" operation_key="all_stopped">
+        <attributes />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="17" operation="stop" operation_key="ip1_stop_0" on_node="rhel7-node2.example.com" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+</transition_graph>
Index: pacemaker/pengine/test10/start-then-stop-with-unfence.scores
===================================================================
--- /dev/null
+++ pacemaker/pengine/test10/start-then-stop-with-unfence.scores
@@ -0,0 +1,19 @@
+Allocation scores:
+clone_color: jrummy-clone allocation score on rhel7-node1.example.com: 500
+clone_color: jrummy-clone allocation score on rhel7-node2.example.com: 500
+clone_color: jrummy:0 allocation score on rhel7-node1.example.com: 0
+clone_color: jrummy:0 allocation score on rhel7-node2.example.com: 1
+clone_color: jrummy:1 allocation score on rhel7-node1.example.com: 0
+clone_color: jrummy:1 allocation score on rhel7-node2.example.com: 0
+native_color: ip1 allocation score on rhel7-node1.example.com: 500
+native_color: ip1 allocation score on rhel7-node2.example.com: 0
+native_color: ip2 allocation score on rhel7-node1.example.com: 0
+native_color: ip2 allocation score on rhel7-node2.example.com: 500
+native_color: jrummy:0 allocation score on rhel7-node1.example.com: 0
+native_color: jrummy:0 allocation score on rhel7-node2.example.com: 1
+native_color: jrummy:1 allocation score on rhel7-node1.example.com: 0
+native_color: jrummy:1 allocation score on rhel7-node2.example.com: -INFINITY
+native_color: mpath-node1 allocation score on rhel7-node1.example.com: 0
+native_color: mpath-node1 allocation score on rhel7-node2.example.com: 0
+native_color: mpath-node2 allocation score on rhel7-node1.example.com: 0
+native_color: mpath-node2 allocation score on rhel7-node2.example.com: 0
Index: pacemaker/pengine/test10/start-then-stop-with-unfence.summary
===================================================================
--- /dev/null
+++ pacemaker/pengine/test10/start-then-stop-with-unfence.summary
@@ -0,0 +1,43 @@
+
+Current cluster status:
+Online: [ rhel7-node1.example.com rhel7-node2.example.com ]
+
+ mpath-node2	(stonith:fence_mpath):	Started rhel7-node2.example.com
+ mpath-node1	(stonith:fence_mpath):	Stopped
+ ip1	(ocf::heartbeat:IPaddr2):	Started rhel7-node2.example.com
+ ip2	(ocf::heartbeat:IPaddr2):	Started rhel7-node2.example.com
+ Clone Set: jrummy-clone [jrummy]
+     Started: [ rhel7-node2.example.com ]
+     Stopped: [ rhel7-node1.example.com ]
+
+Transition Summary:
+ * Start   mpath-node1	(rhel7-node1.example.com)
+ * Move    ip1	(Started rhel7-node2.example.com -> rhel7-node1.example.com)
+ * Start   jrummy:1	(rhel7-node1.example.com)
+
+Executing cluster transition:
+ * Pseudo action:   jrummy-clone_start_0
+ * Pseudo action:   probe_complete
+ * Fencing rhel7-node1.example.com (on)
+ * Resource action: mpath-node2     monitor on rhel7-node1.example.com
+ * Resource action: mpath-node1     monitor on rhel7-node1.example.com
+ * Resource action: jrummy          start on rhel7-node1.example.com
+ * Pseudo action:   jrummy-clone_running_0
+ * Resource action: mpath-node1     start on rhel7-node1.example.com
+ * Resource action: ip1             stop on rhel7-node2.example.com
+ * Resource action: jrummy          monitor=10000 on rhel7-node1.example.com
+ * Pseudo action:   all_stopped
+ * Resource action: mpath-node1     monitor=60000 on rhel7-node1.example.com
+ * Resource action: ip1             start on rhel7-node1.example.com
+ * Resource action: ip1             monitor=10000 on rhel7-node1.example.com
+
+Revised cluster status:
+Online: [ rhel7-node1.example.com rhel7-node2.example.com ]
+
+ mpath-node2	(stonith:fence_mpath):	Started rhel7-node2.example.com
+ mpath-node1	(stonith:fence_mpath):	Started rhel7-node1.example.com
+ ip1	(ocf::heartbeat:IPaddr2):	Started rhel7-node1.example.com
+ ip2	(ocf::heartbeat:IPaddr2):	Started rhel7-node2.example.com
+ Clone Set: jrummy-clone [jrummy]
+     Started: [ rhel7-node1.example.com rhel7-node2.example.com ]
+
Index: pacemaker/pengine/test10/start-then-stop-with-unfence.xml
===================================================================
--- /dev/null
+++ pacemaker/pengine/test10/start-then-stop-with-unfence.xml
@@ -0,0 +1,149 @@
+<cib crm_feature_set="3.0.10" validate-with="pacemaker-2.3" epoch="152" num_updates="27" admin_epoch="0" cib-last-written="Thu Dec 10 15:33:54 2015" update-origin="rhel7-node2.example.com" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="2">
+  <configuration>
+    <crm_config>
+      <cluster_property_set id="cib-bootstrap-options">
+        <nvpair id="cib-bootstrap-options-have-watchdog" name="have-watchdog" value="false"/>
+        <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.13-10.el7-44eb2dd"/>
+        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
+        <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="rhel7-cluster"/>
+        <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1449777402"/>
+      </cluster_property_set>
+    </crm_config>
+    <nodes>
+      <node id="1" uname="rhel7-node1.example.com">
+        <instance_attributes id="nodes-1"/>
+      </node>
+      <node id="2" uname="rhel7-node2.example.com">
+        <instance_attributes id="nodes-2"/>
+      </node>
+    </nodes>
+    <resources>
+      <primitive class="stonith" id="mpath-node2" type="fence_mpath">
+        <instance_attributes id="mpath-node2-instance_attributes">
+          <nvpair id="mpath-node2-instance_attributes-key" name="key" value="1234"/>
+          <nvpair id="mpath-node2-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="rhel7-node2.example.com"/>
+          <nvpair id="mpath-node2-instance_attributes-devices" name="devices" value="/dev/mapper/clustPVa"/>
+        </instance_attributes>
+        <operations>
+          <op id="mpath-node2-monitor-interval-60s" interval="60s" name="monitor"/>
+        </operations>
+        <meta_attributes id="mpath-node2-meta_attributes">
+          <nvpair id="mpath-node2-meta_attributes-provides" name="provides" value="unfencing"/>
+        </meta_attributes>
+      </primitive>
+      <primitive class="stonith" id="mpath-node1" type="fence_mpath">
+        <instance_attributes id="mpath-node1-instance_attributes">
+          <nvpair id="mpath-node1-instance_attributes-key" name="key" value="1233"/>
+          <nvpair id="mpath-node1-instance_attributes-pcmk_host_list" name="pcmk_host_list" value="rhel7-node1.example.com"/>
+          <nvpair id="mpath-node1-instance_attributes-devices" name="devices" value="/dev/mapper/clustPVa"/>
+        </instance_attributes>
+        <operations>
+          <op id="mpath-node1-monitor-interval-60s" interval="60s" name="monitor"/>
+        </operations>
+        <meta_attributes id="mpath-node1-meta_attributes">
+          <nvpair id="mpath-node1-meta_attributes-provides" name="provides" value="unfencing"/>
+        </meta_attributes>
+      </primitive>
+      <primitive class="ocf" id="ip1" provider="heartbeat" type="IPaddr2">
+        <instance_attributes id="ip1-instance_attributes">
+          <nvpair id="ip1-instance_attributes-ip" name="ip" value="192.168.143.161"/>
+          <nvpair id="ip1-instance_attributes-cidr_netmask" name="cidr_netmask" value="24"/>
+        </instance_attributes>
+        <operations>
+          <op id="ip1-start-interval-0s" interval="0s" name="start" timeout="20s"/>
+          <op id="ip1-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
+          <op id="ip1-monitor-interval-10s" interval="10s" name="monitor" timeout="20s"/>
+        </operations>
+      </primitive>
+      <primitive class="ocf" id="ip2" provider="heartbeat" type="IPaddr2">
+        <instance_attributes id="ip2-instance_attributes">
+          <nvpair id="ip2-instance_attributes-ip" name="ip" value="192.168.143.162"/>
+          <nvpair id="ip2-instance_attributes-cidr_netmask" name="cidr_netmask" value="24"/>
+        </instance_attributes>
+        <operations>
+          <op id="ip2-start-interval-0s" interval="0s" name="start" timeout="20s"/>
+          <op id="ip2-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
+          <op id="ip2-monitor-interval-10s" interval="10s" name="monitor" timeout="20s"/>
+        </operations>
+      </primitive>
+      <clone id="jrummy-clone">
+        <primitive class="ocf" id="jrummy" provider="heartbeat" type="jrummyRA">
+          <operations>
+            <op id="jrummy-start-timeout-300" interval="0s" name="start" timeout="300"/>
+            <op id="jrummy-stop-interval-0s" interval="0s" name="stop" timeout="30"/>
+            <op id="jrummy-monitor-interval-10" interval="10" name="monitor" timeout="30"/>
+            <op id="jrummy-promote-interval-0s" interval="0s" name="promote" timeout="120"/>
+            <op id="jrummy-demote-interval-0s" interval="0s" name="demote" timeout="120"/>
+          </operations>
+          <meta_attributes id="jrummy-meta_attributes"/>
+        </primitive>
+        <meta_attributes id="jrummy-clone-meta_attributes"/>
+      </clone>
+    </resources>
+    <constraints>
+      <rsc_colocation id="colocation-ip1-jrummy-clone-INFINITY" rsc="ip1" score="INFINITY" with-rsc="jrummy-clone"/>
+      <rsc_colocation id="colocation-ip2-jrummy-clone-INFINITY" rsc="ip2" score="INFINITY" with-rsc="jrummy-clone"/>
+      <rsc_location id="location-ip1-rhel7-node1.example.com-500" node="rhel7-node1.example.com" rsc="ip1" score="500"/>
+      <rsc_location id="location-ip2-rhel7-node2.example.com-500" node="rhel7-node2.example.com" rsc="ip2" score="500"/>
+      <rsc_order first="jrummy-clone" first-action="start" id="order-jrummy-clone-ip1-Optional" kind="Optional" symmetrical="false" then="ip1" then-action="stop"/>
+      <rsc_order first="jrummy-clone" first-action="start" id="order-jrummy-clone-ip2-Optional" kind="Optional" symmetrical="false" then="ip2" then-action="stop"/>
+    </constraints>
+  </configuration>
+  <status>
+    <node_state id="2" uname="rhel7-node2.example.com" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <transient_attributes id="2">
+        <instance_attributes id="status-2">
+          <nvpair id="status-2-shutdown" name="shutdown" value="0"/>
+          <nvpair id="status-2-probe_complete" name="probe_complete" value="true"/>
+        </instance_attributes>
+      </transient_attributes>
+      <lrm id="2">
+        <lrm_resources>
+          <lrm_resource id="jrummy" type="jrummyRA" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="jrummy_last_failure_0" operation_key="jrummy_monitor_0" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="15:44:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;15:44:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="136" rc-code="0" op-status="0" interval="0" last-run="1449777312" last-rc-change="1449777312" exec-time="22" queue-time="0" op-digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+            <lrm_rsc_op id="jrummy_last_0" operation_key="jrummy_monitor_0" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="15:44:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;15:44:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="136" rc-code="0" op-status="0" interval="0" last-run="1449777312" last-rc-change="1449777312" exec-time="22" queue-time="0" op-digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+            <lrm_rsc_op id="jrummy_monitor_10000" operation_key="jrummy_monitor_10000" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="35:45:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;35:45:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="139" rc-code="0" op-status="0" interval="10000" last-rc-change="1449777312" exec-time="21" queue-time="0" op-digest="02a5bcf940fc8d3239701acb11438d6a"/>
+          </lrm_resource>
+          <lrm_resource id="mpath-node2" type="fence_mpath" class="stonith">
+            <lrm_rsc_op id="mpath-node2_last_0" operation_key="mpath-node2_start_0" operation="start" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="17:1:0:dfd424e5-7b69-4529-8d63-544eff51d0e7" transition-magic="0:0;17:1:0:dfd424e5-7b69-4529-8d63-544eff51d0e7" on_node="rhel7-node2.example.com" call-id="27" rc-code="0" op-status="0" interval="0" last-run="1448401384" last-rc-change="1448401384" exec-time="185" queue-time="0" op-digest="b97ef86afabe0426040d1bef247023ee"/>
+            <lrm_rsc_op id="mpath-node2_monitor_60000" operation_key="mpath-node2_monitor_60000" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="22:2:0:dfd424e5-7b69-4529-8d63-544eff51d0e7" transition-magic="0:0;22:2:0:dfd424e5-7b69-4529-8d63-544eff51d0e7" on_node="rhel7-node2.example.com" call-id="30" rc-code="0" op-status="0" interval="60000" last-rc-change="1448401385" exec-time="187" queue-time="0" op-digest="08e7f91df6cfd3e64e4e273877cae3b2"/>
+          </lrm_resource>
+          <lrm_resource id="ip1" type="IPaddr2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="ip1_last_0" operation_key="ip1_start_0" operation="start" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="26:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;26:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="176" rc-code="0" op-status="0" interval="0" last-run="1449779587" last-rc-change="1449779587" exec-time="91" queue-time="0" op-digest="b6f4b45133b07648d423c37bde6306fc"/>
+            <lrm_rsc_op id="ip1_monitor_10000" operation_key="ip1_monitor_10000" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="27:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;27:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="179" rc-code="0" op-status="0" interval="10000" last-rc-change="1449779587" exec-time="58" queue-time="0" op-digest="febe1be7eb0e5c0ccbae163040822b24"/>
+          </lrm_resource>
+          <lrm_resource id="ip2" type="IPaddr2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="ip2_last_0" operation_key="ip2_start_0" operation="start" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="30:77:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;30:77:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="172" rc-code="0" op-status="0" interval="0" last-run="1449779478" last-rc-change="1449779478" exec-time="76" queue-time="0" op-digest="fceb53b1a753418193d6b0c6858d8aef"/>
+            <lrm_rsc_op id="ip2_monitor_10000" operation_key="ip2_monitor_10000" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="3:77:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;3:77:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="173" rc-code="0" op-status="0" interval="10000" last-rc-change="1449779478" exec-time="48" queue-time="0" op-digest="4c2054a6edf1762d819eae38fa63f861"/>
+          </lrm_resource>
+          <lrm_resource id="mpath-node1" type="fence_mpath" class="stonith">
+            <lrm_rsc_op id="mpath-node1_last_0" operation_key="mpath-node1_stop_0" operation="stop" crm-debug-origin="do_update_resource" crm_feature_set="3.0.10" transition-key="16:93:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;16:93:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="187" rc-code="0" op-status="0" interval="0" last-run="1449779653" last-rc-change="1449779653" exec-time="1" queue-time="0" op-digest="019ed48e26413030411da3ae8888a649"/>
+            <lrm_rsc_op id="mpath-node1_monitor_60000" operation_key="mpath-node1_monitor_60000" operation="monitor" crm-debug-origin="build_active_RAs" crm_feature_set="3.0.10" transition-key="21:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;21:81:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node2.example.com" call-id="177" rc-code="0" op-status="0" interval="60000" last-rc-change="1449779587" exec-time="231" queue-time="0" op-digest="e66cba21113eb0e7f835fa12c375178c"/>
+          </lrm_resource>
+        </lrm_resources>
+      </lrm>
+    </node_state>
+    <node_state id="1" uname="rhel7-node1.example.com" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <lrm id="1">
+        <lrm_resources>
+          <lrm_resource id="jrummy" type="jrummyRA" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="jrummy_last_failure_0" operation_key="jrummy_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.10" transition-key="15:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;15:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node1.example.com" call-id="14" rc-code="0" op-status="0" interval="0" last-run="1449779745" last-rc-change="1449779745" exec-time="118" queue-time="0" op-digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+            <lrm_rsc_op id="jrummy_last_0" operation_key="jrummy_stop_0" operation="stop" crm-debug-origin="do_update_resource" crm_feature_set="3.0.10" transition-key="26:93:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:0;26:93:0:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node1.example.com" call-id="15" rc-code="0" op-status="0" interval="0" last-run="1449779745" last-rc-change="1449779745" exec-time="17" queue-time="0" op-digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
+          </lrm_resource>
+          <lrm_resource id="ip1" type="IPaddr2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="ip1_last_0" operation_key="ip1_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.10" transition-key="13:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:7;13:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node1.example.com" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1449779745" last-rc-change="1449779745" exec-time="155" queue-time="1" op-digest="b6f4b45133b07648d423c37bde6306fc"/>
+          </lrm_resource>
+          <lrm_resource id="ip2" type="IPaddr2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="ip2_last_0" operation_key="ip2_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.10" transition-key="14:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" transition-magic="0:7;14:91:7:3a75519c-468d-4424-8222-0a5d6dd23eb9" on_node="rhel7-node1.example.com" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1449779745" last-rc-change="1449779745" exec-time="149" queue-time="0" op-digest="fceb53b1a753418193d6b0c6858d8aef"/>
+          </lrm_resource>
+        </lrm_resources>
+      </lrm>
+      <transient_attributes id="1">
+        <instance_attributes id="status-1">
+          <nvpair id="status-1-shutdown" name="shutdown" value="0"/>
+          <nvpair id="status-1-probe_complete" name="probe_complete" value="true"/>
+        </instance_attributes>
+      </transient_attributes>
+    </node_state>
+  </status>
+</cib>
