Just curious: I suppose its my first constraint that does this job?

second - the colocation one

Okay thanks - so sure I even got the 50/50 wrong :p

Then I must ask another question: Why does this not apply to colocated primitives?

I just tested with a single primitive (testdb) colocated to the master role of ms-drbd2:

drbd2:0 node1   0
drbd2:0 node2   76
drbd2:1 node1   76
drbd2:1 node2   -infin
testdb node1   0
testdb node2   500

<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>
<primitive id="testdb" class="ocf" type="filesystem" provider="heartbeat">
                        <instance_attributes id="ia-mount">
                                <attributes>
<nvpair id="ia-mount-1" name="device" value="/dev/drbd2"/> <nvpair id="ia-mount-2" name="directory" value="/packages/postgres/data/"/> <nvpair id="ia-mount-3" name="fstype" value="ext3"/>
                                </attributes>
                        </instance_attributes>
                        <operations>
<op id="op-mount-1" name="monitor" interval="5s" timeout="5s" start_delay="30s" role="Started"/>
                        </operations>
                </primitive>
</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