Hi

sorry I have to bother again about score calculation but I came across something I don't understand and that might be a bug.

I have a master-slave drbd resource called ms-drbd (primitive is called drbd2) and a group named testdb (4 primitives, "mount" being the first primitive).
pingd multiplier is 300 (5 ping nodes)
default-resource-stickiness is 200

And these are my constraints:
<constraints>
<rsc_order id="drbd2_before_testdb" from="testdb" action="start" to="ms-drbd2" to_action="promote"/> <rsc_colocation id="testdb_on_drbd2" to="ms-drbd2" to_role="master" from="testdb" score="300"/>
</constraints>

When I look at the scores, I see

drbd2:0 node1 0
Okay.

drbd2:0 node2 676
Weird
This looks like the crm_master value from the drbd OCF RA plus stickiness times (number_of_group_items - 1).

How I come to think this has to do with the group? Because if I add another item to the group, the score increases by 1 x stickiness.

Guess this shouldn't be, should it?

drbd2:1 node1 76
crm_master value from drbd OCF RA

drbd2:1 node2 -infinity
Okay.

mount node1 0
Okay.

mount node2 1100
300 (constraint)
+ 4 x 300 (pingd)

Regards
Dominik

Here's the cib.xml

   <configuration>
     <crm_config>
       <cluster_property_set id="cib-bootstrap-options">
         <attributes>
<nvpair name="no-quorum-policy" value="stop" id="no-quorum-policy"/> <nvpair name="symmetric-cluster" value="true" id="symmetric-cluster"/> <nvpair name="stonith-enabled" value="false" id="stonith-enabled"/> <nvpair name="stonith-action" value="reboot" id="stonith-action"/> <nvpair name="default-resource-stickiness" value="200" id="default-resource-stickiness"/> <nvpair name="default-resource-failure-stickiness" value="-100" id="default-resource-failure-stickiness"/> <nvpair name="is-managed-default" value="true" id="is-managed-default"/> <nvpair name="default-action-timeout" value="20s" id="default-action-timeout"/> <nvpair name="stop-orphan-resources" value="true" id="stop-orphan-resources"/> <nvpair name="stop-orphan-actions" value="true" id="stop-orphan-actions"/> <nvpair name="remove-after-stop" value="false" id="remove-after-stop"/> <nvpair name="pe-error-series-max" value="-1" id="pe-error-series-max"/> <nvpair name="pe-warn-series-max" value="-1" id="pe-warn-series-max"/> <nvpair name="pe-input-series-max" value="-1" id="pe-input-series-max"/> <nvpair name="startup-fencing" value="true" id="startup-fencing"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
<resources>
        <master_slave id="ms-drbd2">
                <meta_attributes id="ma-ms-drbd2">
                        <attributes>
<nvpair id="ma-ms-drbd2-1" name="clone_max" value="2"/> <nvpair id="ma-ms-drbd2-2" name="clone_node_max" value="1"/> <nvpair id="ma-ms-drbd2-3" name="master_max" value="1"/> <nvpair id="ma-ms-drbd2-4" name="master_node_max" value="1"/> <nvpair id="ma-ms-drbd2-5" name="notify" value="yes"/> <nvpair id="ma-ms-drbd2-6" name="globally_unique" value="false"/> <nvpair id="ma-ms-drbd2-7" name="target_role" value="started"/>
                        </attributes>
                </meta_attributes>
<primitive id="drbd2" class="ocf" provider="heartbeat" type="drbd">
                        <instance_attributes id="ia-drbd2">
                                <attributes>
<nvpair id="ia-drbd2-1" name="drbd_resource" value="drbd2"/>
                                </attributes>
                        </instance_attributes>
                        <operations>
<op id="op-ms-drbd2-1" name="monitor" interval="5s" timeout="5s" start_delay="30s" role="Master"/> <op id="op-ms-drbd2-2" name="monitor" interval="6s" timeout="5s" start_delay="30s" role="Slave"/>
                        </operations>
                </primitive>
        </master_slave>
        <group id="testdb">
                <meta_attributes id="ma-testdb">
                        <attributes>
<nvpair id="ma-testdb-1" name="target_role" value="started"/>
                        </attributes>
                </meta_attributes>
<primitive id="mount" class="ocf" type="filesystem" provider="heartbeat">
                        ...
                </primitive>
<primitive id="postgres" class="ocf" type="pgsql" provider="heartbeat">
                        ...
                </primitive>
<primitive id="masterip" class="ocf" type="IPaddr2" provider="heartbeat">
                        ...
                </primitive>
<primitive id="slon" class="ocf" type="dkcustom" provider="dk">
                        ...
                </primitive>
        </group>
</resources>
<constraints>
<rsc_order id="drbd2_before_testdb" from="testdb" action="start" to="ms-drbd2" to_action="promote"/> <rsc_colocation id="testdb_on_drbd2" to="ms-drbd2" to_role="master" from="testdb" score="300"/>
</constraints>
</configuration>

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to