commit 6638a2f9c6a736f38618935b6406c4c519627b11
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Tue Aug 29 20:15:47 2017 -0500

    Test: pengine: new regression test for master scores at initial resource start

Index: pacemaker-1.1.16+20170320.77ea74d/pengine/regression.sh
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/pengine/regression.sh
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/regression.sh
@@ -438,6 +438,7 @@ do_test bug-cl-5213 "Ensure role colocat
 do_test bug-cl-5219 "Allow unrelated resources with a common colocation target to remain promoted"
 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"
 
 echo ""
 do_test history-1 "Correctly parse stateful-1 resource state"
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.dot
===================================================================
--- /dev/null
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.dot
@@ -0,0 +1,76 @@
+digraph "g" {
+"pgsql-ha_confirmed-post_notify_promoted_0" -> "pgsql-master-ip_start_0 srv1" [ style = bold]
+"pgsql-ha_confirmed-post_notify_promoted_0" -> "pgsqld:0_monitor_15000 srv1" [ style = bold]
+"pgsql-ha_confirmed-post_notify_promoted_0" -> "pgsqld:1_monitor_16000 srv2" [ style = bold]
+"pgsql-ha_confirmed-post_notify_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_confirmed-post_notify_running_0" -> "pgsql-ha_pre_notify_promote_0" [ style = bold]
+"pgsql-ha_confirmed-post_notify_running_0" -> "pgsqld:0_monitor_15000 srv1" [ style = bold]
+"pgsql-ha_confirmed-post_notify_running_0" -> "pgsqld:1_monitor_16000 srv2" [ style = bold]
+"pgsql-ha_confirmed-post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_confirmed-pre_notify_promote_0" -> "pgsql-ha_post_notify_promoted_0" [ style = bold]
+"pgsql-ha_confirmed-pre_notify_promote_0" -> "pgsql-ha_promote_0" [ style = bold]
+"pgsql-ha_confirmed-pre_notify_promote_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_confirmed-pre_notify_start_0" -> "pgsql-ha_post_notify_running_0" [ style = bold]
+"pgsql-ha_confirmed-pre_notify_start_0" -> "pgsql-ha_start_0" [ style = bold]
+"pgsql-ha_confirmed-pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_post_notify_promoted_0" -> "pgsql-ha_confirmed-post_notify_promoted_0" [ style = bold]
+"pgsql-ha_post_notify_promoted_0" -> "pgsqld:0_post_notify_promote_0 srv1" [ style = bold]
+"pgsql-ha_post_notify_promoted_0" -> "pgsqld:1_post_notify_promote_0 srv2" [ style = bold]
+"pgsql-ha_post_notify_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_post_notify_running_0" -> "pgsql-ha_confirmed-post_notify_running_0" [ style = bold]
+"pgsql-ha_post_notify_running_0" -> "pgsqld:0_post_notify_start_0 srv1" [ style = bold]
+"pgsql-ha_post_notify_running_0" -> "pgsqld:1_post_notify_start_0 srv2" [ style = bold]
+"pgsql-ha_post_notify_running_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_pre_notify_promote_0" -> "pgsql-ha_confirmed-pre_notify_promote_0" [ style = bold]
+"pgsql-ha_pre_notify_promote_0" -> "pgsqld:0_pre_notify_promote_0 srv1" [ style = bold]
+"pgsql-ha_pre_notify_promote_0" -> "pgsqld:1_pre_notify_promote_0 srv2" [ style = bold]
+"pgsql-ha_pre_notify_promote_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_pre_notify_start_0" -> "pgsql-ha_confirmed-pre_notify_start_0" [ style = bold]
+"pgsql-ha_pre_notify_start_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_promote_0" -> "pgsqld:0_promote_0 srv1" [ style = bold]
+"pgsql-ha_promote_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_promoted_0" -> "pgsql-ha_post_notify_promoted_0" [ style = bold]
+"pgsql-ha_promoted_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_running_0" -> "pgsql-ha_post_notify_running_0" [ style = bold]
+"pgsql-ha_running_0" -> "pgsql-ha_promote_0" [ style = bold]
+"pgsql-ha_running_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-ha_start_0" -> "pgsql-ha_running_0" [ style = bold]
+"pgsql-ha_start_0" -> "pgsqld:0_start_0 srv1" [ style = bold]
+"pgsql-ha_start_0" -> "pgsqld:1_start_0 srv2" [ style = bold]
+"pgsql-ha_start_0" [ style=bold color="green" fontcolor="orange"]
+"pgsql-master-ip_monitor_0 srv1" -> "pgsql-master-ip_start_0 srv1" [ style = bold]
+"pgsql-master-ip_monitor_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsql-master-ip_monitor_0 srv2" -> "pgsql-master-ip_start_0 srv1" [ style = bold]
+"pgsql-master-ip_monitor_0 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsql-master-ip_monitor_10000 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsql-master-ip_start_0 srv1" -> "pgsql-master-ip_monitor_10000 srv1" [ style = bold]
+"pgsql-master-ip_start_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_monitor_0 srv1" -> "pgsql-ha_start_0" [ style = bold]
+"pgsqld:0_monitor_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_monitor_15000 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_post_notify_promote_0 srv1" -> "pgsql-ha_confirmed-post_notify_promoted_0" [ style = bold]
+"pgsqld:0_post_notify_promote_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_post_notify_start_0 srv1" -> "pgsql-ha_confirmed-post_notify_running_0" [ style = bold]
+"pgsqld:0_post_notify_start_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_pre_notify_promote_0 srv1" -> "pgsql-ha_confirmed-pre_notify_promote_0" [ style = bold]
+"pgsqld:0_pre_notify_promote_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_promote_0 srv1" -> "pgsql-ha_promoted_0" [ style = bold]
+"pgsqld:0_promote_0 srv1" -> "pgsqld:0_monitor_15000 srv1" [ style = bold]
+"pgsqld:0_promote_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:0_start_0 srv1" -> "pgsql-ha_running_0" [ style = bold]
+"pgsqld:0_start_0 srv1" -> "pgsqld:0_monitor_15000 srv1" [ style = bold]
+"pgsqld:0_start_0 srv1" -> "pgsqld:0_promote_0 srv1" [ style = bold]
+"pgsqld:0_start_0 srv1" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_monitor_0 srv2" -> "pgsql-ha_start_0" [ style = bold]
+"pgsqld:1_monitor_0 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_monitor_16000 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_post_notify_promote_0 srv2" -> "pgsql-ha_confirmed-post_notify_promoted_0" [ style = bold]
+"pgsqld:1_post_notify_promote_0 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_post_notify_start_0 srv2" -> "pgsql-ha_confirmed-post_notify_running_0" [ style = bold]
+"pgsqld:1_post_notify_start_0 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_pre_notify_promote_0 srv2" -> "pgsql-ha_confirmed-pre_notify_promote_0" [ style = bold]
+"pgsqld:1_pre_notify_promote_0 srv2" [ style=bold color="green" fontcolor="black"]
+"pgsqld:1_start_0 srv2" -> "pgsql-ha_running_0" [ style = bold]
+"pgsqld:1_start_0 srv2" -> "pgsqld:1_monitor_16000 srv2" [ style = bold]
+"pgsqld:1_start_0 srv2" [ style=bold color="green" fontcolor="black"]
+}
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.exp
===================================================================
--- /dev/null
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.exp
@@ -0,0 +1,410 @@
+<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="44" operation="notify" operation_key="pgsqld:0_post_notify_promote_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_name="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="post" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="27" operation="notify" operation_key="pgsql-ha_post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="1">
+    <action_set>
+      <rsc_op id="43" operation="notify" operation_key="pgsqld:0_pre_notify_promote_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_name="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="pre" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="25" operation="notify" operation_key="pgsql-ha_pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="2" priority="1000000">
+    <action_set>
+      <rsc_op id="41" operation="notify" operation_key="pgsqld:0_post_notify_start_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_name="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="post" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="15" operation="notify" operation_key="pgsql-ha_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="3">
+    <action_set>
+      <rsc_op id="8" operation="monitor" operation_key="pgsqld:0_monitor_15000" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <attributes CRM_meta_clone="0" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_interval="15000" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="monitor" CRM_meta_notify="true" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_op_target_rc="8" CRM_meta_role="Master" CRM_meta_timeout="10000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="6" operation="start" operation_key="pgsqld:0_start_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="7" operation="promote" operation_key="pgsqld:0_promote_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="16" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="28" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="4">
+    <action_set>
+      <rsc_op id="7" operation="promote" operation_key="pgsqld:0_promote_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_name="promote" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="30000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="6" operation="start" operation_key="pgsqld:0_start_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="23" operation="promote" operation_key="pgsql-ha_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="5">
+    <action_set>
+      <rsc_op id="6" operation="start" operation_key="pgsqld:0_start_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_name="start" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="11" operation="start" operation_key="pgsql-ha_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="6">
+    <action_set>
+      <rsc_op id="2" operation="monitor" operation_key="pgsqld:0_monitor_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsqld" long-id="pgsqld:0" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_op_target_rc="7" CRM_meta_timeout="10000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="7" priority="1000000">
+    <action_set>
+      <rsc_op id="46" operation="notify" operation_key="pgsqld:1_post_notify_promote_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="post" CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="27" operation="notify" operation_key="pgsql-ha_post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="8">
+    <action_set>
+      <rsc_op id="45" operation="notify" operation_key="pgsqld:1_pre_notify_promote_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="pre" CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="25" operation="notify" operation_key="pgsql-ha_pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="9" priority="1000000">
+    <action_set>
+      <rsc_op id="42" operation="notify" operation_key="pgsqld:1_post_notify_start_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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="notify" CRM_meta_notify="true" CRM_meta_notify_active_resource=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" 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="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_notify_type="post" CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="15" operation="notify" operation_key="pgsql-ha_post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="10">
+    <action_set>
+      <rsc_op id="10" operation="monitor" operation_key="pgsqld:1_monitor_16000" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <attributes CRM_meta_clone="1" CRM_meta_clone_max="2" CRM_meta_clone_node_max="1" CRM_meta_globally_unique="false" CRM_meta_interval="16000" CRM_meta_master_max="1" CRM_meta_master_node_max="1" CRM_meta_name="monitor" CRM_meta_notify="true" CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_role="Slave" CRM_meta_timeout="10000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="9" operation="start" operation_key="pgsqld:1_start_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="16" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="28" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="11">
+    <action_set>
+      <rsc_op id="9" operation="start" operation_key="pgsqld:1_start_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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=" " CRM_meta_notify_active_uname=" " CRM_meta_notify_all_uname="srv1 srv2" CRM_meta_notify_available_uname="srv2 srv1" CRM_meta_notify_demote_resource=" " CRM_meta_notify_demote_uname=" " CRM_meta_notify_inactive_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_master_resource=" " CRM_meta_notify_master_uname=" " CRM_meta_notify_promote_resource="pgsqld:0" CRM_meta_notify_promote_uname="srv1" CRM_meta_notify_slave_resource=" " CRM_meta_notify_slave_uname=" " CRM_meta_notify_start_resource="pgsqld:0 pgsqld:1" CRM_meta_notify_start_uname="srv1 srv2" CRM_meta_notify_stop_resource=" " CRM_meta_notify_stop_uname=" " CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="60000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <pseudo_event id="11" operation="start" operation_key="pgsql-ha_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="12">
+    <action_set>
+      <rsc_op id="4" operation="monitor" operation_key="pgsqld:1_monitor_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsqld" long-id="pgsqld:1" class="ocf" provider="heartbeat" type="pgsqlms"/>
+        <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_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_op_target_rc="7" CRM_meta_timeout="10000" bindir="/usr/pgsql-10/bin"  pgdata="/var/lib/pgsql/10/data"/>
+      </rsc_op>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="13" priority="1000000">
+    <action_set>
+      <pseudo_event id="28" operation="notified" operation_key="pgsql-ha_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="27" operation="notify" operation_key="pgsql-ha_post_notify_promoted_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="44" operation="notify" operation_key="pgsqld:0_post_notify_promote_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="46" operation="notify" operation_key="pgsqld:1_post_notify_promote_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="14" priority="1000000">
+    <action_set>
+      <pseudo_event id="27" operation="notify" operation_key="pgsql-ha_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="24" operation="promoted" operation_key="pgsql-ha_promoted_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="notified" operation_key="pgsql-ha_confirmed-pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="15">
+    <action_set>
+      <pseudo_event id="26" operation="notified" operation_key="pgsql-ha_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="25" operation="notify" operation_key="pgsql-ha_pre_notify_promote_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="43" operation="notify" operation_key="pgsqld:0_pre_notify_promote_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="45" operation="notify" operation_key="pgsqld:1_pre_notify_promote_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="16">
+    <action_set>
+      <pseudo_event id="25" operation="notify" operation_key="pgsql-ha_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="16" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_running_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="17" priority="1000000">
+    <action_set>
+      <pseudo_event id="24" operation="promoted" operation_key="pgsql-ha_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="7" operation="promote" operation_key="pgsqld:0_promote_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="18">
+    <action_set>
+      <pseudo_event id="23" operation="promote" operation_key="pgsql-ha_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="12" operation="running" operation_key="pgsql-ha_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="26" operation="notified" operation_key="pgsql-ha_confirmed-pre_notify_promote_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="19" priority="1000000">
+    <action_set>
+      <pseudo_event id="16" operation="notified" operation_key="pgsql-ha_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="15" operation="notify" operation_key="pgsql-ha_post_notify_running_0"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="41" operation="notify" operation_key="pgsqld:0_post_notify_start_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="42" operation="notify" operation_key="pgsqld:1_post_notify_start_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="20" priority="1000000">
+    <action_set>
+      <pseudo_event id="15" operation="notify" operation_key="pgsql-ha_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="12" operation="running" operation_key="pgsql-ha_running_0"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="14" operation="notified" operation_key="pgsql-ha_confirmed-pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="21">
+    <action_set>
+      <pseudo_event id="14" operation="notified" operation_key="pgsql-ha_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="13" operation="notify" operation_key="pgsql-ha_pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="22">
+    <action_set>
+      <pseudo_event id="13" operation="notify" operation_key="pgsql-ha_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/>
+  </synapse>
+  <synapse id="23" priority="1000000">
+    <action_set>
+      <pseudo_event id="12" operation="running" operation_key="pgsql-ha_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="6" operation="start" operation_key="pgsqld:0_start_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="9" operation="start" operation_key="pgsqld:1_start_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="11" operation="start" operation_key="pgsql-ha_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="24">
+    <action_set>
+      <pseudo_event id="11" operation="start" operation_key="pgsql-ha_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>
+        <rsc_op id="2" operation="monitor" operation_key="pgsqld:0_monitor_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="4" operation="monitor" operation_key="pgsqld:1_monitor_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="14" operation="notified" operation_key="pgsql-ha_confirmed-pre_notify_start_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="25">
+    <action_set>
+      <rsc_op id="36" operation="monitor" operation_key="pgsql-master-ip_monitor_10000" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsql-master-ip" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_interval="10000" CRM_meta_name="monitor" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.122.50"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="35" operation="start" operation_key="pgsql-master-ip_start_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="26">
+    <action_set>
+      <rsc_op id="35" operation="start" operation_key="pgsql-master-ip_start_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsql-master-ip" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_name="start" CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.122.50"/>
+      </rsc_op>
+    </action_set>
+    <inputs>
+      <trigger>
+        <rsc_op id="3" operation="monitor" operation_key="pgsql-master-ip_monitor_0" on_node="srv1" on_node_uuid="1"/>
+      </trigger>
+      <trigger>
+        <rsc_op id="5" operation="monitor" operation_key="pgsql-master-ip_monitor_0" on_node="srv2" on_node_uuid="2"/>
+      </trigger>
+      <trigger>
+        <pseudo_event id="28" operation="notified" operation_key="pgsql-ha_confirmed-post_notify_promoted_0"/>
+      </trigger>
+    </inputs>
+  </synapse>
+  <synapse id="27">
+    <action_set>
+      <rsc_op id="5" operation="monitor" operation_key="pgsql-master-ip_monitor_0" on_node="srv2" on_node_uuid="2">
+        <primitive id="pgsql-master-ip" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_on_node="srv2" CRM_meta_on_node_uuid="2" CRM_meta_op_target_rc="7" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.122.50"/>
+      </rsc_op>
+    </action_set>
+    <inputs/>
+  </synapse>
+  <synapse id="28">
+    <action_set>
+      <rsc_op id="3" operation="monitor" operation_key="pgsql-master-ip_monitor_0" on_node="srv1" on_node_uuid="1">
+        <primitive id="pgsql-master-ip" class="ocf" provider="heartbeat" type="IPaddr2"/>
+        <attributes CRM_meta_on_node="srv1" CRM_meta_on_node_uuid="1" CRM_meta_op_target_rc="7" CRM_meta_timeout="20000" cidr_netmask="24"  ip="192.168.122.50"/>
+      </rsc_op>
+    </action_set>
+    <inputs/>
+  </synapse>
+</transition_graph>
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.scores
===================================================================
--- /dev/null
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.scores
@@ -0,0 +1,15 @@
+Allocation scores:
+clone_color: pgsql-ha allocation score on srv1: 0
+clone_color: pgsql-ha allocation score on srv2: 0
+clone_color: pgsqld:0 allocation score on srv1: 1001
+clone_color: pgsqld:0 allocation score on srv2: 1000
+clone_color: pgsqld:1 allocation score on srv1: 1001
+clone_color: pgsqld:1 allocation score on srv2: 1000
+native_color: pgsql-master-ip allocation score on srv1: 1001
+native_color: pgsql-master-ip allocation score on srv2: -INFINITY
+native_color: pgsqld:0 allocation score on srv1: 1001
+native_color: pgsqld:0 allocation score on srv2: 1000
+native_color: pgsqld:1 allocation score on srv1: -INFINITY
+native_color: pgsqld:1 allocation score on srv2: 1000
+pgsqld:0 promotion score on srv1: 1001
+pgsqld:1 promotion score on srv2: 1000
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.summary
===================================================================
--- /dev/null
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.summary
@@ -0,0 +1,53 @@
+
+Current cluster status:
+Online: [ srv1 srv2 ]
+
+ Master/Slave Set: pgsql-ha [pgsqld]
+     Stopped: [ srv1 srv2 ]
+ pgsql-master-ip	(ocf::heartbeat:IPaddr2):	Stopped
+
+Transition Summary:
+ * Start   pgsqld:0	(srv1)
+ * Promote    pgsqld:0            ( Stopped -> Master srv1 )  
+ * Start      pgsqld:1            (                   srv2 )  
+ * Start      pgsql-master-ip     (                   srv1 )  
+
+Executing cluster transition:
+ * Resource action: pgsqld:0        monitor on srv1
+ * Resource action: pgsqld:1        monitor on srv2
+ * Pseudo action:   pgsql-ha_pre_notify_start_0
+ * Resource action: pgsql-master-ip monitor on srv2
+ * Resource action: pgsql-master-ip monitor on srv1
+ * Pseudo action:   pgsql-ha_confirmed-pre_notify_start_0
+ * Pseudo action:   pgsql-ha_start_0
+ * Resource action: pgsqld:0        start on srv1
+ * Resource action: pgsqld:1        start on srv2
+ * Pseudo action:   pgsql-ha_running_0
+ * Pseudo action:   pgsql-ha_post_notify_running_0
+ * Resource action: pgsqld:0        notify on srv1
+ * Resource action: pgsqld:1        notify on srv2
+ * Pseudo action:   pgsql-ha_confirmed-post_notify_running_0
+ * Pseudo action:   pgsql-ha_pre_notify_promote_0
+ * Resource action: pgsqld:0        notify on srv1
+ * Resource action: pgsqld:1        notify on srv2
+ * Pseudo action:   pgsql-ha_confirmed-pre_notify_promote_0
+ * Pseudo action:   pgsql-ha_promote_0
+ * Resource action: pgsqld:0        promote on srv1
+ * Pseudo action:   pgsql-ha_promoted_0
+ * Pseudo action:   pgsql-ha_post_notify_promoted_0
+ * Resource action: pgsqld:0        notify on srv1
+ * Resource action: pgsqld:1        notify on srv2
+ * Pseudo action:   pgsql-ha_confirmed-post_notify_promoted_0
+ * Resource action: pgsql-master-ip start on srv1
+ * Resource action: pgsqld:0        monitor=15000 on srv1
+ * Resource action: pgsqld:1        monitor=16000 on srv2
+ * Resource action: pgsql-master-ip monitor=10000 on srv1
+
+Revised cluster status:
+Online: [ srv1 srv2 ]
+
+ Master/Slave Set: pgsql-ha [pgsqld]
+     Masters: [ srv1 ]
+     Slaves: [ srv2 ]
+ pgsql-master-ip	(ocf::heartbeat:IPaddr2):	Started srv1
+
Index: pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.xml
===================================================================
--- /dev/null
+++ pacemaker-1.1.16+20170320.77ea74d/pengine/test10/master-score-startup.xml
@@ -0,0 +1,79 @@
+<cib crm_feature_set="3.0.10" validate-with="pacemaker-2.5" epoch="28" num_updates="21" admin_epoch="0" cib-last-written="Tue Aug 29 12:51:46 2017" update-origin="srv1" update-client="crm_attribute" update-user="root" have-quorum="1" dc-uuid="1">
+  <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.15-11.el7_3.4-e174ec8"/>
+        <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
+        <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="cluster_pgsql"/>
+        <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
+        <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1504000703"/>
+      </cluster_property_set>
+    </crm_config>
+    <nodes>
+      <node id="1" uname="srv1">
+        <instance_attributes id="nodes-1">
+          <nvpair id="nodes-1-master-pgsqld" name="master-pgsqld" value="1001"/>
+        </instance_attributes>
+      </node>
+      <node id="2" uname="srv2">
+        <instance_attributes id="nodes-2">
+          <nvpair id="nodes-2-master-pgsqld" name="master-pgsqld" value="1000"/>
+        </instance_attributes>
+      </node>
+    </nodes>
+    <resources>
+      <master id="pgsql-ha">
+        <primitive class="ocf" id="pgsqld" provider="heartbeat" type="pgsqlms">
+          <instance_attributes id="pgsqld-instance_attributes">
+            <nvpair id="pgsqld-instance_attributes-bindir" name="bindir" value="/usr/pgsql-10/bin"/>
+            <nvpair id="pgsqld-instance_attributes-pgdata" name="pgdata" value="/var/lib/pgsql/10/data"/>
+          </instance_attributes>
+          <operations>
+            <op id="pgsqld-start-interval-0s" interval="0s" name="start" timeout="60s"/>
+            <op id="pgsqld-stop-interval-0s" interval="0s" name="stop" timeout="60s"/>
+            <op id="pgsqld-promote-interval-0s" interval="0s" name="promote" timeout="30s"/>
+            <op id="pgsqld-demote-interval-0s" interval="0s" name="demote" timeout="120s"/>
+            <op id="pgsqld-monitor-interval-15s" interval="15s" name="monitor" role="Master" timeout="10s"/>
+            <op id="pgsqld-monitor-interval-16s" interval="16s" name="monitor" role="Slave" timeout="10s"/>
+            <op id="pgsqld-notify-interval-0s" interval="0s" name="notify" timeout="60s"/>
+          </operations>
+        </primitive>
+        <meta_attributes id="pgsql-ha-meta_attributes">
+          <nvpair id="pgsql-ha-meta_attributes-master-max" name="master-max" value="1"/>
+          <nvpair id="pgsql-ha-meta_attributes-master-node-max" name="master-node-max" value="1"/>
+          <nvpair id="pgsql-ha-meta_attributes-clone-node-max" name="clone-node-max" value="1"/>
+          <nvpair id="pgsql-ha-meta_attributes-notify" name="notify" value="true"/>
+        </meta_attributes>
+      </master>
+      <primitive class="ocf" id="pgsql-master-ip" provider="heartbeat" type="IPaddr2">
+        <instance_attributes id="pgsql-master-ip-instance_attributes">
+          <nvpair id="pgsql-master-ip-instance_attributes-ip" name="ip" value="192.168.122.50"/>
+          <nvpair id="pgsql-master-ip-instance_attributes-cidr_netmask" name="cidr_netmask" value="24"/>
+        </instance_attributes>
+        <operations>
+          <op id="pgsql-master-ip-start-interval-0s" interval="0s" name="start" timeout="20s"/>
+          <op id="pgsql-master-ip-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
+          <op id="pgsql-master-ip-monitor-interval-10s" interval="10s" name="monitor"/>
+        </operations>
+      </primitive>
+    </resources>
+    <constraints>
+      <rsc_colocation id="colocation-pgsql-master-ip-pgsql-ha-INFINITY" rsc="pgsql-master-ip" rsc-role="Started" score="INFINITY" with-rsc="pgsql-ha" with-rsc-role="Master"/>
+      <rsc_order first="pgsql-ha" first-action="promote" id="order-pgsql-ha-pgsql-master-ip-Mandatory" kind="Mandatory" symmetrical="false" then="pgsql-master-ip" then-action="start"/>
+      <rsc_order first="pgsql-ha" first-action="demote" id="order-pgsql-ha-pgsql-master-ip-Mandatory-1" kind="Mandatory" symmetrical="false" then="pgsql-master-ip" then-action="stop"/>
+    </constraints>
+    <rsc_defaults>
+      <meta_attributes id="rsc_defaults-options">
+        <nvpair id="rsc_defaults-options-migration-threshold" name="migration-threshold" value="5"/>
+        <nvpair id="rsc_defaults-options-resource-stickiness" name="resource-stickiness" value="10"/>
+      </meta_attributes>
+    </rsc_defaults>
+  </configuration>
+  <status>
+    <node_state id="1" uname="srv1" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
+    </node_state>
+    <node_state id="2" uname="srv2" in_ccm="true" crmd="online" join="member" expected="member" crm-debug-origin="crm_simulate">
+    </node_state>
+  </status>
+</cib>
