commit 6f89cd6f332bccdd5607e17d8649bc354e5b6d8b
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Fri Dec 15 16:40:36 2017 -0600

    Test: PE: add tests for recovery after failed demote
    
    There are two tests, one for recovering the resource in slave mode,
    and one for recovering it in master mode.
    
    The master test is a rare situation -- if the instance needed to be master, we
    wouldn't have scheduled a demote. But this handles the situation when we get
    the demote failure result and a new (winning) master score for the node at the
    same time.

diff --git a/pengine/regression.sh b/pengine/regression.sh
index b3cb0f088..7ce8a7b18 100755
--- a/pengine/regression.sh
+++ b/pengine/regression.sh
@@ -447,6 +447,8 @@ do_test bug-cl-5219 "Allow unrelated resources with a common colocation target t
 do_test master-asymmetrical-order "Fix the behaviors of multi-state resources with asymmetrical ordering"
 do_test master-notify "Master promotion with notifies"
 do_test master-score-startup "Use permanent master scores without LRM history"
+do_test failed-demote-recovery "Recover resource in slave role after demote fails"
+do_test failed-demote-recovery-master "Recover resource in master role after demote fails"
 
 echo ""
 do_test history-1 "Correctly parse stateful-1 resource state"
diff --git a/pengine/test10/failed-demote-recovery-master.dot b/pengine/test10/failed-demote-recovery-master.dot
new file mode 100644
index 000000000..71c2b814b
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery-master.dot
@@ -0,0 +1,92 @@
+digraph "g" {
+"DB2_HADR-master_confirmed-post_notify_promoted_0" -> "DB2_HADR_monitor_22000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-post_notify_running_0" -> "DB2_HADR-master_pre_notify_promote_0" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_running_0" -> "DB2_HADR_monitor_22000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" -> "DB2_HADR-master_pre_notify_promote_0" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" -> "DB2_HADR-master_pre_notify_start_0" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" -> "all_stopped" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-pre_notify_promote_0" -> "DB2_HADR-master_post_notify_promoted_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_promote_0" -> "DB2_HADR-master_promote_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_promote_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-pre_notify_start_0" -> "DB2_HADR-master_post_notify_running_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_start_0" -> "DB2_HADR-master_start_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" -> "DB2_HADR-master_post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" -> "DB2_HADR-master_stop_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_post_notify_promoted_0" -> "DB2_HADR-master_confirmed-post_notify_promoted_0" [ style = bold]
+"DB2_HADR-master_post_notify_promoted_0" -> "DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_post_notify_promoted_0" -> "DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_post_notify_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_post_notify_stopped_0" -> "DB2_HADR-master_confirmed-post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_post_notify_stopped_0" -> "DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_pre_notify_promote_0" -> "DB2_HADR-master_confirmed-pre_notify_promote_0" [ style = bold]
+"DB2_HADR-master_pre_notify_promote_0" -> "DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_pre_notify_promote_0" -> "DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_pre_notify_promote_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_pre_notify_start_0" -> "DB2_HADR-master_confirmed-pre_notify_start_0" [ style = bold]
+"DB2_HADR-master_pre_notify_start_0" -> "DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_promote_0" -> "DB2_HADR_promote_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_promote_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_promoted_0" -> "DB2_HADR-master_post_notify_promoted_0" [ style = bold]
+"DB2_HADR-master_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_running_0" -> "DB2_HADR-master_post_notify_running_0" [ style = bold]
+"DB2_HADR-master_running_0" -> "DB2_HADR-master_promote_0" [ style = bold]
+"DB2_HADR-master_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_start_0" -> "DB2_HADR-master_running_0" [ style = bold]
+"DB2_HADR-master_start_0" -> "DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_stop_0" -> "DB2_HADR-master_stopped_0" [ style = bold]
+"DB2_HADR-master_stop_0" -> "DB2_HADR_stop_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_stopped_0" -> "DB2_HADR-master_post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_stopped_0" -> "DB2_HADR-master_promote_0" [ style = bold]
+"DB2_HADR-master_stopped_0" -> "DB2_HADR-master_start_0" [ style = bold]
+"DB2_HADR-master_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR_monitor_22000 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-post_notify_promoted_0" [ style = bold]
+"DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-post_notify_promoted_0" [ style = bold]
+"DB2_HADR_post_notify_promoted_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-post_notify_stopped_0" [ style = bold]
+"DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-pre_notify_promote_0" [ style = bold]
+"DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-pre_notify_promote_0" [ style = bold]
+"DB2_HADR_pre_notify_promote_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-pre_notify_start_0" [ style = bold]
+"DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_promote_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_promoted_0" [ style = bold]
+"DB2_HADR_promote_0 fastvm-rhel-7-4-96" -> "DB2_HADR_monitor_22000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_promote_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_running_0" [ style = bold]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" -> "DB2_HADR_monitor_22000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" -> "DB2_HADR_promote_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_stopped_0" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "all_stopped" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"all_stopped" [ style=bold color="green" fontcolor="orange"]
+}
diff --git a/pengine/test10/failed-demote-recovery-master.exp b/pengine/test10/failed-demote-recovery-master.exp
new file mode 100644
index 000000000..ce0f80451
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery-master.exp
@@ -0,0 +1,483 @@
+<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="48" operation="notify" operation_key="DB2_HADR_post_notify_promote_0" internal_operation_key="DB2_HADR:0_post_notify_promote_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="promoted" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="promote" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="31" operation="notify" operation_key="DB2_HADR-master_post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="1">
+    <action_set>
+      <rsc_op id="47" operation="notify" operation_key="DB2_HADR_pre_notify_promote_0" internal_operation_key="DB2_HADR:0_pre_notify_promote_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="promote" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="promote" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="29" operation="notify" operation_key="DB2_HADR-master_pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="2" priority="1000000">
+    <action_set>
+      <rsc_op id="45" operation="notify" operation_key="DB2_HADR_post_notify_stop_0" internal_operation_key="DB2_HADR:0_post_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="25" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="3">
+    <action_set>
+      <rsc_op id="44" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:0_pre_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="23" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="4" priority="1000000">
+    <action_set>
+      <rsc_op id="42" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:0_post_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="19" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="5">
+    <action_set>
+      <rsc_op id="41" operation="notify" operation_key="DB2_HADR_pre_notify_start_0" internal_operation_key="DB2_HADR:0_pre_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="17" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="6" priority="1000000">
+    <action_set>
+      <rsc_op id="50" operation="notify" operation_key="DB2_HADR_post_notify_promote_0" internal_operation_key="DB2_HADR:1_post_notify_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="promoted" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="promote" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="31" operation="notify" operation_key="DB2_HADR-master_post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="7">
+    <action_set>
+      <rsc_op id="49" operation="notify" operation_key="DB2_HADR_pre_notify_promote_0" internal_operation_key="DB2_HADR:1_pre_notify_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="promote" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="promote" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="29" operation="notify" operation_key="DB2_HADR-master_pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="8">
+    <action_set>
+      <rsc_op id="46" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:1_pre_notify_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="23" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="9" priority="1000000">
+    <action_set>
+      <rsc_op id="43" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:1_post_notify_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="19" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="10">
+    <action_set>
+      <rsc_op id="14" operation="monitor" operation_key="DB2_HADR_monitor_22000" internal_operation_key="DB2_HADR:1_monitor_22000" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_interval="22000" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="monitor" CRM_meta_notify="true" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_op_target_rc="8" CRM_meta_role="Master" CRM_meta_timeout="60000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="13" operation="promote" operation_key="DB2_HADR_promote_0" internal_operation_key="DB2_HADR:1_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="20" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="32" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="11">
+    <action_set>
+      <rsc_op id="13" operation="promote" operation_key="DB2_HADR_promote_0" internal_operation_key="DB2_HADR:1_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="promote" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="120000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="27" operation="promote" operation_key="DB2_HADR-master_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="12">
+    <action_set>
+      <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="start" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="120000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="15" operation="start" operation_key="DB2_HADR-master_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="13">
+    <action_set>
+      <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="stop" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="DB2_HADR:1" CRM_meta_notify_promote_uname="fastvm-rhel-7-4-96" CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="120000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="21" operation="stop" operation_key="DB2_HADR-master_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="14" priority="1000000">
+    <action_set>
+      <pseudo_event id="32" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_promoted_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="promoted" CRM_meta_notify_key_type="confirmed-post" CRM_meta_notify_operation="promote" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="31" operation="notify" operation_key="DB2_HADR-master_post_notify_promoted_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="48" operation="notify" operation_key="DB2_HADR_post_notify_promote_0" internal_operation_key="DB2_HADR:0_post_notify_promote_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="50" operation="notify" operation_key="DB2_HADR_post_notify_promote_0" internal_operation_key="DB2_HADR:1_post_notify_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="15" priority="1000000">
+    <action_set>
+      <pseudo_event id="31" operation="notify" operation_key="DB2_HADR-master_post_notify_promoted_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="promoted" CRM_meta_notify_key_type="post" CRM_meta_notify_operation="promote" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="28" operation="promoted" operation_key="DB2_HADR-master_promoted_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="30" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="16">
+    <action_set>
+      <pseudo_event id="30" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_promote_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="promote" CRM_meta_notify_key_type="confirmed-pre" CRM_meta_notify_operation="promote" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="29" operation="notify" operation_key="DB2_HADR-master_pre_notify_promote_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="47" operation="notify" operation_key="DB2_HADR_pre_notify_promote_0" internal_operation_key="DB2_HADR:0_pre_notify_promote_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="49" operation="notify" operation_key="DB2_HADR_pre_notify_promote_0" internal_operation_key="DB2_HADR:1_pre_notify_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="17">
+    <action_set>
+      <pseudo_event id="29" operation="notify" operation_key="DB2_HADR-master_pre_notify_promote_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="promote" CRM_meta_notify_key_type="pre" CRM_meta_notify_operation="promote" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="20" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="18" priority="1000000">
+    <action_set>
+      <pseudo_event id="28" operation="promoted" operation_key="DB2_HADR-master_promoted_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="13" operation="promote" operation_key="DB2_HADR_promote_0" internal_operation_key="DB2_HADR:1_promote_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="19">
+    <action_set>
+      <pseudo_event id="27" operation="promote" operation_key="DB2_HADR-master_promote_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="16" operation="running" operation_key="DB2_HADR-master_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="22" operation="stopped" operation_key="DB2_HADR-master_stopped_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="30" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="20" priority="1000000">
+    <action_set>
+      <pseudo_event id="26" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="confirmed-post" CRM_meta_notify_operation="stop" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="25" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="45" operation="notify" operation_key="DB2_HADR_post_notify_stop_0" internal_operation_key="DB2_HADR:0_post_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="21" priority="1000000">
+    <action_set>
+      <pseudo_event id="25" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="post" CRM_meta_notify_operation="stop" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="22" operation="stopped" operation_key="DB2_HADR-master_stopped_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="24" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="22">
+    <action_set>
+      <pseudo_event id="24" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="confirmed-pre" CRM_meta_notify_operation="stop" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="23" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="44" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:0_pre_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="46" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:1_pre_notify_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="23">
+    <action_set>
+      <pseudo_event id="23" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_operation="stop" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="24" priority="1000000">
+    <action_set>
+      <pseudo_event id="22" operation="stopped" operation_key="DB2_HADR-master_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="21" operation="stop" operation_key="DB2_HADR-master_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="25">
+    <action_set>
+      <pseudo_event id="21" operation="stop" operation_key="DB2_HADR-master_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="24" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="26" priority="1000000">
+    <action_set>
+      <pseudo_event id="20" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="confirmed-post" CRM_meta_notify_operation="start" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="19" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="42" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:0_post_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="43" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:1_post_notify_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="27" priority="1000000">
+    <action_set>
+      <pseudo_event id="19" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_operation="start" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="16" operation="running" operation_key="DB2_HADR-master_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="18" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="28">
+    <action_set>
+      <pseudo_event id="18" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="confirmed-pre" CRM_meta_notify_operation="start" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="17" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="41" operation="notify" operation_key="DB2_HADR_pre_notify_start_0" internal_operation_key="DB2_HADR:0_pre_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="29">
+    <action_set>
+      <pseudo_event id="17" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="pre" CRM_meta_notify_operation="start" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="26" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="30" priority="1000000">
+    <action_set>
+      <pseudo_event id="16" operation="running" operation_key="DB2_HADR-master_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="15" operation="start" operation_key="DB2_HADR-master_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="31">
+    <action_set>
+      <pseudo_event id="15" operation="start" operation_key="DB2_HADR-master_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="18" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="22" operation="stopped" operation_key="DB2_HADR-master_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="32">
+    <action_set>
+      <pseudo_event id="5" operation="all_stopped" operation_key="all_stopped">
+        <attributes />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+</transition_graph>
diff --git a/pengine/test10/failed-demote-recovery-master.scores b/pengine/test10/failed-demote-recovery-master.scores
new file mode 100644
index 000000000..02b08da04
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery-master.scores
@@ -0,0 +1,18 @@
+Allocation scores:
+DB2_HADR:0 promotion score on fastvm-rhel-7-4-95: -1
+DB2_HADR:1 promotion score on fastvm-rhel-7-4-96: 10000
+Using the original execution date of: 2017-11-30 12:37:50Z
+clone_color: DB2_HADR-master allocation score on fastvm-rhel-7-4-95: 0
+clone_color: DB2_HADR-master allocation score on fastvm-rhel-7-4-96: 0
+clone_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-95: 1
+clone_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-96: 0
+clone_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-95: 0
+clone_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-96: 10001
+native_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-95: 1
+native_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-96: 0
+native_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-95: -INFINITY
+native_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-96: 10001
+native_color: fence-fastvm-rhel-7-4-95 allocation score on fastvm-rhel-7-4-95: -INFINITY
+native_color: fence-fastvm-rhel-7-4-95 allocation score on fastvm-rhel-7-4-96: 0
+native_color: fence-fastvm-rhel-7-4-96 allocation score on fastvm-rhel-7-4-95: 0
+native_color: fence-fastvm-rhel-7-4-96 allocation score on fastvm-rhel-7-4-96: -INFINITY
diff --git a/pengine/test10/failed-demote-recovery-master.summary b/pengine/test10/failed-demote-recovery-master.summary
new file mode 100644
index 000000000..61e206516
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery-master.summary
@@ -0,0 +1,59 @@
+Using the original execution date of: 2017-11-30 12:37:50Z
+
+Current cluster status:
+Online: [ fastvm-rhel-7-4-95 fastvm-rhel-7-4-96 ]
+
+ fence-fastvm-rhel-7-4-95	(stonith:fence_xvm):	Started fastvm-rhel-7-4-96
+ fence-fastvm-rhel-7-4-96	(stonith:fence_xvm):	Started fastvm-rhel-7-4-95
+ Master/Slave Set: DB2_HADR-master [DB2_HADR]
+     DB2_HADR	(ocf::heartbeat:db2):	FAILED fastvm-rhel-7-4-96
+     Slaves: [ fastvm-rhel-7-4-95 ]
+
+Transition Summary:
+ * Recover    DB2_HADR:1     ( Slave -> Master fastvm-rhel-7-4-96 )  
+
+Executing cluster transition:
+ * Pseudo action:   DB2_HADR-master_pre_notify_stop_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-pre_notify_stop_0
+ * Pseudo action:   DB2_HADR-master_stop_0
+ * Resource action: DB2_HADR        stop on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_stopped_0
+ * Pseudo action:   DB2_HADR-master_post_notify_stopped_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Pseudo action:   DB2_HADR-master_confirmed-post_notify_stopped_0
+ * Pseudo action:   DB2_HADR-master_pre_notify_start_0
+ * Pseudo action:   all_stopped
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Pseudo action:   DB2_HADR-master_confirmed-pre_notify_start_0
+ * Pseudo action:   DB2_HADR-master_start_0
+ * Resource action: DB2_HADR        start on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_running_0
+ * Pseudo action:   DB2_HADR-master_post_notify_running_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-post_notify_running_0
+ * Pseudo action:   DB2_HADR-master_pre_notify_promote_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-pre_notify_promote_0
+ * Pseudo action:   DB2_HADR-master_promote_0
+ * Resource action: DB2_HADR        promote on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_promoted_0
+ * Pseudo action:   DB2_HADR-master_post_notify_promoted_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-post_notify_promoted_0
+ * Resource action: DB2_HADR        monitor=22000 on fastvm-rhel-7-4-96
+Using the original execution date of: 2017-11-30 12:37:50Z
+
+Revised cluster status:
+Online: [ fastvm-rhel-7-4-95 fastvm-rhel-7-4-96 ]
+
+ fence-fastvm-rhel-7-4-95	(stonith:fence_xvm):	Started fastvm-rhel-7-4-96
+ fence-fastvm-rhel-7-4-96	(stonith:fence_xvm):	Started fastvm-rhel-7-4-95
+ Master/Slave Set: DB2_HADR-master [DB2_HADR]
+     Masters: [ fastvm-rhel-7-4-96 ]
+     Slaves: [ fastvm-rhel-7-4-95 ]
+
diff --git a/pengine/test10/failed-demote-recovery-master.xml b/pengine/test10/failed-demote-recovery-master.xml
new file mode 100644
index 000000000..5f2c759b2
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery-master.xml
@@ -0,0 +1,109 @@
+<cib crm_feature_set="3.0.12" validate-with="pacemaker-2.8" epoch="43" num_updates="34" admin_epoch="0" cib-last-written="Thu Nov 30 10:45:57 2017" update-origin="fastvm-rhel-7-4-95" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="2" execution-date="1512045470">
+  <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.16-12.el7_4.4-94ff4df"/>
+        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
+        <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="pacemaker"/>
+        <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1510400096"/>
+      </cluster_property_set>
+    </crm_config>
+    <nodes>
+      <node id="1" uname="fastvm-rhel-7-4-95"/>
+      <node id="2" uname="fastvm-rhel-7-4-96"/>
+    </nodes>
+    <resources>
+      <primitive class="stonith" id="fence-fastvm-rhel-7-4-95" type="fence_xvm">
+        <instance_attributes id="fence-fastvm-rhel-7-4-95-instance_attributes">
+          <nvpair id="fence-fastvm-rhel-7-4-95-instance_attributes-pcmk_host_map" name="pcmk_host_map" value="fastvm-rhel-7-4-95:fastvm-rhel-7.4-95;"/>
+        </instance_attributes>
+        <operations>
+          <op id="fence-fastvm-rhel-7-4-95-monitor-interval-30s" interval="30s" name="monitor"/>
+        </operations>
+      </primitive>
+      <primitive class="stonith" id="fence-fastvm-rhel-7-4-96" type="fence_xvm">
+        <instance_attributes id="fence-fastvm-rhel-7-4-96-instance_attributes">
+          <nvpair id="fence-fastvm-rhel-7-4-96-instance_attributes-pcmk_host_map" name="pcmk_host_map" value="fastvm-rhel-7-4-96:fastvm-rhel-7.4-96;"/>
+        </instance_attributes>
+        <operations>
+          <op id="fence-fastvm-rhel-7-4-96-monitor-interval-30s" interval="30s" name="monitor"/>
+        </operations>
+      </primitive>
+      <master id="DB2_HADR-master">
+        <primitive class="ocf" id="DB2_HADR" provider="heartbeat" type="db2">
+          <instance_attributes id="DB2_HADR-instance_attributes">
+            <nvpair id="DB2_HADR-instance_attributes-dblist" name="dblist" value="sample"/>
+            <nvpair id="DB2_HADR-instance_attributes-instance" name="instance" value="db2inst1"/>
+          </instance_attributes>
+          <operations>
+            <op id="DB2_HADR-demote-interval-0s" interval="0s" name="demote" timeout="120"/>
+            <op id="DB2_HADR-monitor-interval-5" interval="5" name="monitor" timeout="60"/>
+            <op id="DB2_HADR-monitor-interval-22" interval="22" name="monitor" role="Master" timeout="60"/>
+            <op id="DB2_HADR-promote-interval-0s" interval="0s" name="promote" timeout="120"/>
+            <op id="DB2_HADR-start-interval-0s" interval="0s" name="start" timeout="120"/>
+            <op id="DB2_HADR-stop-interval-0s" interval="0s" name="stop" timeout="120"/>
+          </operations>
+        </primitive>
+        <meta_attributes id="DB2_HADR-master-meta_attributes">
+          <nvpair id="DB2_HADR-master-meta_attributes-notify" name="notify" value="true"/>
+        </meta_attributes>
+      </master>
+    </resources>
+    <constraints>
+      <rsc_location id="location-fence-fastvm-rhel-7-4-95-fastvm-rhel-7-4-95--INFINITY" node="fastvm-rhel-7-4-95" rsc="fence-fastvm-rhel-7-4-95" score="-INFINITY"/>
+      <rsc_location id="location-fence-fastvm-rhel-7-4-96-fastvm-rhel-7-4-96--INFINITY" node="fastvm-rhel-7-4-96" rsc="fence-fastvm-rhel-7-4-96" score="-INFINITY"/>
+    </constraints>
+  </configuration>
+  <status>
+    <node_state id="1" uname="fastvm-rhel-7-4-95" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <lrm id="1">
+        <lrm_resources>
+          <lrm_resource id="fence-fastvm-rhel-7-4-95" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_last_0" operation_key="fence-fastvm-rhel-7-4-95_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:7;2:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1512045354" last-rc-change="1512045354" exec-time="2" queue-time="0" op-digest="1f5e25ac7aeffe6b7ef496aa2beef389"/>
+          </lrm_resource>
+          <lrm_resource id="fence-fastvm-rhel-7-4-96" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_last_0" operation_key="fence-fastvm-rhel-7-4-96_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="10:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;10:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="10" rc-code="0" op-status="0" interval="0" last-run="1512045355" last-rc-change="1512045355" exec-time="30" queue-time="0" op-digest="ebbe6c92ee38534505179a50abeedbf4"/>
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_monitor_30000" operation_key="fence-fastvm-rhel-7-4-96_monitor_30000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="11:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;11:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="16" rc-code="0" op-status="0" interval="30000" last-rc-change="1512045356" exec-time="37" queue-time="0" op-digest="8b4afd9c3a888342128f479c8e1dace8"/>
+          </lrm_resource>
+          <lrm_resource id="DB2_HADR" type="db2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="DB2_HADR_last_0" operation_key="DB2_HADR_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="12:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;12:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="17" rc-code="0" op-status="0" interval="0" last-run="1512045356" last-rc-change="1512045356" exec-time="7313" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211"/>
+            <lrm_rsc_op id="DB2_HADR_monitor_5000" operation_key="DB2_HADR_monitor_5000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="10:2:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;10:2:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="21" rc-code="0" op-status="0" interval="5000" last-rc-change="1512045370" exec-time="502" queue-time="0" op-digest="98fc644b089b38f3260d8d6ca270e021"/>
+          </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-db2hadr_db2inst1_sample_fal" name="db2hadr_db2inst1_sample_fal" value="S0000026.LOG"/>
+          <nvpair id="status-2-master-DB2_HADR" name="master-DB2_HADR" value="-1"/>
+        </instance_attributes>
+      </transient_attributes>
+    </node_state>
+    <node_state id="2" uname="fastvm-rhel-7-4-96" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <lrm id="2">
+        <lrm_resources>
+          <lrm_resource id="fence-fastvm-rhel-7-4-95" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_last_0" operation_key="fence-fastvm-rhel-7-4-95_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="8:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;8:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="15" rc-code="0" op-status="0" interval="0" last-run="1512045355" last-rc-change="1512045355" exec-time="27" queue-time="0" op-digest="1f5e25ac7aeffe6b7ef496aa2beef389"/>
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_monitor_30000" operation_key="fence-fastvm-rhel-7-4-95_monitor_30000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="9:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;9:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="16" rc-code="0" op-status="0" interval="30000" last-rc-change="1512045356" exec-time="27" queue-time="0" op-digest="06c9171b9535dbe0c70fade4a335add7"/>
+          </lrm_resource>
+          <lrm_resource id="fence-fastvm-rhel-7-4-96" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_last_0" operation_key="fence-fastvm-rhel-7-4-96_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:7;6:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1512045354" last-rc-change="1512045354" exec-time="0" queue-time="0" op-digest="ebbe6c92ee38534505179a50abeedbf4"/>
+          </lrm_resource>
+          <lrm_resource id="DB2_HADR" type="db2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="DB2_HADR_last_0" operation_key="DB2_HADR_demote_0" operation="demote" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:1;13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="25" rc-code="1" op-status="0" interval="0" last-run="1512045470" last-rc-change="1512045470" exec-time="422" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211"/>
+            <lrm_rsc_op id="DB2_HADR_last_failure_0" operation_key="DB2_HADR_demote_0" operation="demote" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:1;13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="25" rc-code="1" op-status="0" interval="0" last-rc-change="1512045470" exec-time="422" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211" last-run="1512045470"/>
+          </lrm_resource>
+        </lrm_resources>
+      </lrm>
+      <transient_attributes id="2">
+        <instance_attributes id="status-2">
+          <nvpair id="status-2-shutdown" name="shutdown" value="0"/>
+          <nvpair id="status-2-fail-count-DB2_HADR" name="fail-count-DB2_HADR" value="2"/>
+          <nvpair id="status-2-last-failure-DB2_HADR" name="last-failure-DB2_HADR" value="1512045470"/>
+          <nvpair id="status-2-master-DB2_HADR" name="master-DB2_HADR" value="10000"/>
+        </instance_attributes>
+      </transient_attributes>
+    </node_state>
+  </status>
+</cib>
diff --git a/pengine/test10/failed-demote-recovery.dot b/pengine/test10/failed-demote-recovery.dot
new file mode 100644
index 000000000..bea51ff93
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery.dot
@@ -0,0 +1,59 @@
+digraph "g" {
+"DB2_HADR-master_confirmed-post_notify_running_0" -> "DB2_HADR_monitor_5000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" -> "DB2_HADR-master_pre_notify_start_0" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" -> "all_stopped" [ style = bold]
+"DB2_HADR-master_confirmed-post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-pre_notify_start_0" -> "DB2_HADR-master_post_notify_running_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_start_0" -> "DB2_HADR-master_start_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" -> "DB2_HADR-master_post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" -> "DB2_HADR-master_stop_0" [ style = bold]
+"DB2_HADR-master_confirmed-pre_notify_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" -> "DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_post_notify_stopped_0" -> "DB2_HADR-master_confirmed-post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_post_notify_stopped_0" -> "DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_pre_notify_start_0" -> "DB2_HADR-master_confirmed-pre_notify_start_0" [ style = bold]
+"DB2_HADR-master_pre_notify_start_0" -> "DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" -> "DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_pre_notify_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_running_0" -> "DB2_HADR-master_post_notify_running_0" [ style = bold]
+"DB2_HADR-master_running_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_start_0" -> "DB2_HADR-master_running_0" [ style = bold]
+"DB2_HADR-master_start_0" -> "DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_start_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_stop_0" -> "DB2_HADR-master_stopped_0" [ style = bold]
+"DB2_HADR-master_stop_0" -> "DB2_HADR_stop_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR-master_stop_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR-master_stopped_0" -> "DB2_HADR-master_post_notify_stopped_0" [ style = bold]
+"DB2_HADR-master_stopped_0" -> "DB2_HADR-master_start_0" [ style = bold]
+"DB2_HADR-master_stopped_0" [ style=bold color="green" fontcolor="orange"]
+"DB2_HADR_monitor_5000 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-post_notify_running_0" [ style = bold]
+"DB2_HADR_post_notify_running_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-post_notify_stopped_0" [ style = bold]
+"DB2_HADR_post_notify_stopped_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-pre_notify_start_0" [ style = bold]
+"DB2_HADR_pre_notify_start_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-95" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_confirmed-pre_notify_stop_0" [ style = bold]
+"DB2_HADR_pre_notify_stop_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_running_0" [ style = bold]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" -> "DB2_HADR_monitor_5000 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR-master_stopped_0" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "DB2_HADR_start_0 fastvm-rhel-7-4-96" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" -> "all_stopped" [ style = bold]
+"DB2_HADR_stop_0 fastvm-rhel-7-4-96" [ style=bold color="green" fontcolor="black"]
+"all_stopped" [ style=bold color="green" fontcolor="orange"]
+}
diff --git a/pengine/test10/failed-demote-recovery.exp b/pengine/test10/failed-demote-recovery.exp
new file mode 100644
index 000000000..2c360201e
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery.exp
@@ -0,0 +1,313 @@
+<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="45" operation="notify" operation_key="DB2_HADR_post_notify_stop_0" internal_operation_key="DB2_HADR:0_post_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="24" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="1">
+    <action_set>
+      <rsc_op id="44" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:0_pre_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="22" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="2" priority="1000000">
+    <action_set>
+      <rsc_op id="42" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:0_post_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="18" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="3">
+    <action_set>
+      <rsc_op id="41" operation="notify" operation_key="DB2_HADR_pre_notify_start_0" internal_operation_key="DB2_HADR:0_pre_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:0" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-95" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="16" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="4">
+    <action_set>
+      <rsc_op id="46" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:1_pre_notify_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="stop" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="pre" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="22" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="5" priority="1000000">
+    <action_set>
+      <rsc_op id="43" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:1_post_notify_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_operation="start" CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_notify_type="post" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="18" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="6">
+    <action_set>
+      <rsc_op id="13" operation="monitor" operation_key="DB2_HADR_monitor_5000" internal_operation_key="DB2_HADR:1_monitor_5000" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_interval="5000" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="monitor" CRM_meta_notify="true" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="60000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="19" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="7">
+    <action_set>
+      <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="start" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="120000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="14" operation="start" operation_key="DB2_HADR-master_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="8">
+    <action_set>
+      <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2">
+        <primitive id="DB2_HADR" long-id="DB2_HADR:1" class="ocf" provider="heartbeat" type="db2"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="stop" CRM_meta_notify="true" CRM_meta_notify_active_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_active_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_all_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_available_uname="fastvm-rhel-7-4-96 fastvm-rhel-7-4-95" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource=" " CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource=" " CRM_meta_notify_promote_uname=" " CRM_meta_notify_slave_resource="DB2_HADR:0 DB2_HADR:1" CRM_meta_notify_slave_uname="fastvm-rhel-7-4-95 fastvm-rhel-7-4-96" CRM_meta_notify_start_resource="DB2_HADR:1" CRM_meta_notify_start_uname="fastvm-rhel-7-4-96" CRM_meta_notify_stop_resource="DB2_HADR:1" CRM_meta_notify_stop_uname="fastvm-rhel-7-4-96" CRM_meta_on_node="fastvm-rhel-7-4-96" CRM_meta_on_node_uuid="2" CRM_meta_timeout="120000"  dblist="sample" instance="db2inst1"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="20" operation="stop" operation_key="DB2_HADR-master_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="9" priority="1000000">
+    <action_set>
+      <pseudo_event id="25" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="confirmed-post" CRM_meta_notify_operation="stop" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="24" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="45" operation="notify" operation_key="DB2_HADR_post_notify_stop_0" internal_operation_key="DB2_HADR:0_post_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="10" priority="1000000">
+    <action_set>
+      <pseudo_event id="24" operation="notify" operation_key="DB2_HADR-master_post_notify_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stopped" CRM_meta_notify_key_type="post" CRM_meta_notify_operation="stop" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="21" operation="stopped" operation_key="DB2_HADR-master_stopped_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="23" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="11">
+    <action_set>
+      <pseudo_event id="23" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="confirmed-pre" CRM_meta_notify_operation="stop" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="22" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="44" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:0_pre_notify_stop_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="46" operation="notify" operation_key="DB2_HADR_pre_notify_stop_0" internal_operation_key="DB2_HADR:1_pre_notify_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="12">
+    <action_set>
+      <pseudo_event id="22" operation="notify" operation_key="DB2_HADR-master_pre_notify_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="stop" CRM_meta_notify_key_type="pre" CRM_meta_notify_operation="stop" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="13" priority="1000000">
+    <action_set>
+      <pseudo_event id="21" operation="stopped" operation_key="DB2_HADR-master_stopped_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="20" operation="stop" operation_key="DB2_HADR-master_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="14">
+    <action_set>
+      <pseudo_event id="20" operation="stop" operation_key="DB2_HADR-master_stop_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="23" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_stop_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="15" priority="1000000">
+    <action_set>
+      <pseudo_event id="19" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="confirmed-post" CRM_meta_notify_operation="start" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="18" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="42" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:0_post_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="43" operation="notify" operation_key="DB2_HADR_post_notify_start_0" internal_operation_key="DB2_HADR:1_post_notify_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="16" priority="1000000">
+    <action_set>
+      <pseudo_event id="18" operation="notify" operation_key="DB2_HADR-master_post_notify_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="running" CRM_meta_notify_key_type="post" CRM_meta_notify_operation="start" CRM_meta_notify_type="post" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="15" operation="running" operation_key="DB2_HADR-master_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="17" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="17">
+    <action_set>
+      <pseudo_event id="17" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="confirmed-pre" CRM_meta_notify_operation="start" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="16" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="41" operation="notify" operation_key="DB2_HADR_pre_notify_start_0" internal_operation_key="DB2_HADR:0_pre_notify_start_0" on_node="fastvm-rhel-7-4-95" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="18">
+    <action_set>
+      <pseudo_event id="16" operation="notify" operation_key="DB2_HADR-master_pre_notify_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_notify_key_operation="start" CRM_meta_notify_key_type="pre" CRM_meta_notify_operation="start" CRM_meta_notify_type="pre" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="25" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="19" priority="1000000">
+    <action_set>
+      <pseudo_event id="15" operation="running" operation_key="DB2_HADR-master_running_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="12" operation="start" operation_key="DB2_HADR_start_0" internal_operation_key="DB2_HADR:1_start_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="14" operation="start" operation_key="DB2_HADR-master_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="20">
+    <action_set>
+      <pseudo_event id="14" operation="start" operation_key="DB2_HADR-master_start_0">
+        <attributes CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_notify="true" CRM_meta_timeout="20000" />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="17" operation="notified" operation_key="DB2_HADR-master_confirmed-pre_notify_start_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="21" operation="stopped" operation_key="DB2_HADR-master_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="21">
+    <action_set>
+      <pseudo_event id="5" operation="all_stopped" operation_key="all_stopped">
+        <attributes />
+      </pseudo_event>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="4" operation="stop" operation_key="DB2_HADR_stop_0" internal_operation_key="DB2_HADR:1_stop_0" on_node="fastvm-rhel-7-4-96" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="25" operation="notified" operation_key="DB2_HADR-master_confirmed-post_notify_stopped_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+</transition_graph>
diff --git a/pengine/test10/failed-demote-recovery.scores b/pengine/test10/failed-demote-recovery.scores
new file mode 100644
index 000000000..0065a810a
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery.scores
@@ -0,0 +1,18 @@
+Allocation scores:
+DB2_HADR:0 promotion score on fastvm-rhel-7-4-95: -1
+DB2_HADR:1 promotion score on fastvm-rhel-7-4-96: -1
+Using the original execution date of: 2017-11-30 12:37:50Z
+clone_color: DB2_HADR-master allocation score on fastvm-rhel-7-4-95: 0
+clone_color: DB2_HADR-master allocation score on fastvm-rhel-7-4-96: 0
+clone_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-95: 1
+clone_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-96: 0
+clone_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-95: 0
+clone_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-96: 1
+native_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-95: 1
+native_color: DB2_HADR:0 allocation score on fastvm-rhel-7-4-96: 0
+native_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-95: -INFINITY
+native_color: DB2_HADR:1 allocation score on fastvm-rhel-7-4-96: 1
+native_color: fence-fastvm-rhel-7-4-95 allocation score on fastvm-rhel-7-4-95: -INFINITY
+native_color: fence-fastvm-rhel-7-4-95 allocation score on fastvm-rhel-7-4-96: 0
+native_color: fence-fastvm-rhel-7-4-96 allocation score on fastvm-rhel-7-4-95: 0
+native_color: fence-fastvm-rhel-7-4-96 allocation score on fastvm-rhel-7-4-96: -INFINITY
diff --git a/pengine/test10/failed-demote-recovery.summary b/pengine/test10/failed-demote-recovery.summary
new file mode 100644
index 000000000..32c6a8081
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery.summary
@@ -0,0 +1,47 @@
+Using the original execution date of: 2017-11-30 12:37:50Z
+
+Current cluster status:
+Online: [ fastvm-rhel-7-4-95 fastvm-rhel-7-4-96 ]
+
+ fence-fastvm-rhel-7-4-95	(stonith:fence_xvm):	Started fastvm-rhel-7-4-96
+ fence-fastvm-rhel-7-4-96	(stonith:fence_xvm):	Started fastvm-rhel-7-4-95
+ Master/Slave Set: DB2_HADR-master [DB2_HADR]
+     DB2_HADR	(ocf::heartbeat:db2):	FAILED fastvm-rhel-7-4-96
+     Slaves: [ fastvm-rhel-7-4-95 ]
+
+Transition Summary:
+ * Recover    DB2_HADR:1     ( Slave fastvm-rhel-7-4-96 )  
+
+Executing cluster transition:
+ * Pseudo action:   DB2_HADR-master_pre_notify_stop_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-pre_notify_stop_0
+ * Pseudo action:   DB2_HADR-master_stop_0
+ * Resource action: DB2_HADR        stop on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_stopped_0
+ * Pseudo action:   DB2_HADR-master_post_notify_stopped_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Pseudo action:   DB2_HADR-master_confirmed-post_notify_stopped_0
+ * Pseudo action:   DB2_HADR-master_pre_notify_start_0
+ * Pseudo action:   all_stopped
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Pseudo action:   DB2_HADR-master_confirmed-pre_notify_start_0
+ * Pseudo action:   DB2_HADR-master_start_0
+ * Resource action: DB2_HADR        start on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_running_0
+ * Pseudo action:   DB2_HADR-master_post_notify_running_0
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-95
+ * Resource action: DB2_HADR        notify on fastvm-rhel-7-4-96
+ * Pseudo action:   DB2_HADR-master_confirmed-post_notify_running_0
+ * Resource action: DB2_HADR        monitor=5000 on fastvm-rhel-7-4-96
+Using the original execution date of: 2017-11-30 12:37:50Z
+
+Revised cluster status:
+Online: [ fastvm-rhel-7-4-95 fastvm-rhel-7-4-96 ]
+
+ fence-fastvm-rhel-7-4-95	(stonith:fence_xvm):	Started fastvm-rhel-7-4-96
+ fence-fastvm-rhel-7-4-96	(stonith:fence_xvm):	Started fastvm-rhel-7-4-95
+ Master/Slave Set: DB2_HADR-master [DB2_HADR]
+     Slaves: [ fastvm-rhel-7-4-95 fastvm-rhel-7-4-96 ]
+
diff --git a/pengine/test10/failed-demote-recovery.xml b/pengine/test10/failed-demote-recovery.xml
new file mode 100644
index 000000000..e50588448
--- /dev/null
+++ b/pengine/test10/failed-demote-recovery.xml
@@ -0,0 +1,109 @@
+<cib crm_feature_set="3.0.12" validate-with="pacemaker-2.8" epoch="43" num_updates="34" admin_epoch="0" cib-last-written="Thu Nov 30 10:45:57 2017" update-origin="fastvm-rhel-7-4-95" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="2" execution-date="1512045470">
+  <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.16-12.el7_4.4-94ff4df"/>
+        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
+        <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="pacemaker"/>
+        <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1510400096"/>
+      </cluster_property_set>
+    </crm_config>
+    <nodes>
+      <node id="1" uname="fastvm-rhel-7-4-95"/>
+      <node id="2" uname="fastvm-rhel-7-4-96"/>
+    </nodes>
+    <resources>
+      <primitive class="stonith" id="fence-fastvm-rhel-7-4-95" type="fence_xvm">
+        <instance_attributes id="fence-fastvm-rhel-7-4-95-instance_attributes">
+          <nvpair id="fence-fastvm-rhel-7-4-95-instance_attributes-pcmk_host_map" name="pcmk_host_map" value="fastvm-rhel-7-4-95:fastvm-rhel-7.4-95;"/>
+        </instance_attributes>
+        <operations>
+          <op id="fence-fastvm-rhel-7-4-95-monitor-interval-30s" interval="30s" name="monitor"/>
+        </operations>
+      </primitive>
+      <primitive class="stonith" id="fence-fastvm-rhel-7-4-96" type="fence_xvm">
+        <instance_attributes id="fence-fastvm-rhel-7-4-96-instance_attributes">
+          <nvpair id="fence-fastvm-rhel-7-4-96-instance_attributes-pcmk_host_map" name="pcmk_host_map" value="fastvm-rhel-7-4-96:fastvm-rhel-7.4-96;"/>
+        </instance_attributes>
+        <operations>
+          <op id="fence-fastvm-rhel-7-4-96-monitor-interval-30s" interval="30s" name="monitor"/>
+        </operations>
+      </primitive>
+      <master id="DB2_HADR-master">
+        <primitive class="ocf" id="DB2_HADR" provider="heartbeat" type="db2">
+          <instance_attributes id="DB2_HADR-instance_attributes">
+            <nvpair id="DB2_HADR-instance_attributes-dblist" name="dblist" value="sample"/>
+            <nvpair id="DB2_HADR-instance_attributes-instance" name="instance" value="db2inst1"/>
+          </instance_attributes>
+          <operations>
+            <op id="DB2_HADR-demote-interval-0s" interval="0s" name="demote" timeout="120"/>
+            <op id="DB2_HADR-monitor-interval-5" interval="5" name="monitor" timeout="60"/>
+            <op id="DB2_HADR-monitor-interval-22" interval="22" name="monitor" role="Master" timeout="60"/>
+            <op id="DB2_HADR-promote-interval-0s" interval="0s" name="promote" timeout="120"/>
+            <op id="DB2_HADR-start-interval-0s" interval="0s" name="start" timeout="120"/>
+            <op id="DB2_HADR-stop-interval-0s" interval="0s" name="stop" timeout="120"/>
+          </operations>
+        </primitive>
+        <meta_attributes id="DB2_HADR-master-meta_attributes">
+          <nvpair id="DB2_HADR-master-meta_attributes-notify" name="notify" value="true"/>
+        </meta_attributes>
+      </master>
+    </resources>
+    <constraints>
+      <rsc_location id="location-fence-fastvm-rhel-7-4-95-fastvm-rhel-7-4-95--INFINITY" node="fastvm-rhel-7-4-95" rsc="fence-fastvm-rhel-7-4-95" score="-INFINITY"/>
+      <rsc_location id="location-fence-fastvm-rhel-7-4-96-fastvm-rhel-7-4-96--INFINITY" node="fastvm-rhel-7-4-96" rsc="fence-fastvm-rhel-7-4-96" score="-INFINITY"/>
+    </constraints>
+  </configuration>
+  <status>
+    <node_state id="1" uname="fastvm-rhel-7-4-95" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <lrm id="1">
+        <lrm_resources>
+          <lrm_resource id="fence-fastvm-rhel-7-4-95" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_last_0" operation_key="fence-fastvm-rhel-7-4-95_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="2:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:7;2:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1512045354" last-rc-change="1512045354" exec-time="2" queue-time="0" op-digest="1f5e25ac7aeffe6b7ef496aa2beef389"/>
+          </lrm_resource>
+          <lrm_resource id="fence-fastvm-rhel-7-4-96" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_last_0" operation_key="fence-fastvm-rhel-7-4-96_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="10:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;10:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="10" rc-code="0" op-status="0" interval="0" last-run="1512045355" last-rc-change="1512045355" exec-time="30" queue-time="0" op-digest="ebbe6c92ee38534505179a50abeedbf4"/>
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_monitor_30000" operation_key="fence-fastvm-rhel-7-4-96_monitor_30000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="11:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;11:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="16" rc-code="0" op-status="0" interval="30000" last-rc-change="1512045356" exec-time="37" queue-time="0" op-digest="8b4afd9c3a888342128f479c8e1dace8"/>
+          </lrm_resource>
+          <lrm_resource id="DB2_HADR" type="db2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="DB2_HADR_last_0" operation_key="DB2_HADR_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="12:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;12:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="17" rc-code="0" op-status="0" interval="0" last-run="1512045356" last-rc-change="1512045356" exec-time="7313" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211"/>
+            <lrm_rsc_op id="DB2_HADR_monitor_5000" operation_key="DB2_HADR_monitor_5000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="10:2:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;10:2:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-95" call-id="21" rc-code="0" op-status="0" interval="5000" last-rc-change="1512045370" exec-time="502" queue-time="0" op-digest="98fc644b089b38f3260d8d6ca270e021"/>
+          </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-db2hadr_db2inst1_sample_fal" name="db2hadr_db2inst1_sample_fal" value="S0000026.LOG"/>
+          <nvpair id="status-2-master-DB2_HADR" name="master-DB2_HADR" value="-1"/>
+        </instance_attributes>
+      </transient_attributes>
+    </node_state>
+    <node_state id="2" uname="fastvm-rhel-7-4-96" in_ccm="true" crmd="online" crm-debug-origin="do_update_resource" join="member" expected="member">
+      <lrm id="2">
+        <lrm_resources>
+          <lrm_resource id="fence-fastvm-rhel-7-4-95" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_last_0" operation_key="fence-fastvm-rhel-7-4-95_start_0" operation="start" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="8:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;8:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="15" rc-code="0" op-status="0" interval="0" last-run="1512045355" last-rc-change="1512045355" exec-time="27" queue-time="0" op-digest="1f5e25ac7aeffe6b7ef496aa2beef389"/>
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-95_monitor_30000" operation_key="fence-fastvm-rhel-7-4-95_monitor_30000" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="9:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:0;9:1:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="16" rc-code="0" op-status="0" interval="30000" last-rc-change="1512045356" exec-time="27" queue-time="0" op-digest="06c9171b9535dbe0c70fade4a335add7"/>
+          </lrm_resource>
+          <lrm_resource id="fence-fastvm-rhel-7-4-96" type="fence_xvm" class="stonith">
+            <lrm_rsc_op id="fence-fastvm-rhel-7-4-96_last_0" operation_key="fence-fastvm-rhel-7-4-96_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="6:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:7;6:1:7:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1512045354" last-rc-change="1512045354" exec-time="0" queue-time="0" op-digest="ebbe6c92ee38534505179a50abeedbf4"/>
+          </lrm_resource>
+          <lrm_resource id="DB2_HADR" type="db2" class="ocf" provider="heartbeat">
+            <lrm_rsc_op id="DB2_HADR_last_0" operation_key="DB2_HADR_demote_0" operation="demote" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:1;13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="25" rc-code="1" op-status="0" interval="0" last-run="1512045470" last-rc-change="1512045470" exec-time="422" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211"/>
+            <lrm_rsc_op id="DB2_HADR_last_failure_0" operation_key="DB2_HADR_demote_0" operation="demote" crm-debug-origin="do_update_resource" crm_feature_set="3.0.12" transition-key="13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" transition-magic="0:1;13:7:0:0319dbbb-5aac-4efe-b719-e59213a5af86" on_node="fastvm-rhel-7-4-96" call-id="25" rc-code="1" op-status="0" interval="0" last-rc-change="1512045470" exec-time="422" queue-time="0" op-digest="379ed3d6241b8a7012b493797c3fa211" last-run="1512045470"/>
+          </lrm_resource>
+        </lrm_resources>
+      </lrm>
+      <transient_attributes id="2">
+        <instance_attributes id="status-2">
+          <nvpair id="status-2-shutdown" name="shutdown" value="0"/>
+          <nvpair id="status-2-fail-count-DB2_HADR" name="fail-count-DB2_HADR" value="2"/>
+          <nvpair id="status-2-last-failure-DB2_HADR" name="last-failure-DB2_HADR" value="1512045470"/>
+          <nvpair id="status-2-master-DB2_HADR" name="master-DB2_HADR" value="-1"/>
+        </instance_attributes>
+      </transient_attributes>
+    </node_state>
+  </status>
+</cib>
