On Fri, 7 Mar 2008, Luis Motta Campos wrote:

People, I'm having a bad time with my constraints.
Assuming that my resources are properly declared, could you please tell
me if those constraints are good or not?

<constraints>
  <rsc_colocation id="ip-together-with-drbd-master" from="ip"
to="ms-drbd0" score="INFINITY" to_role="Master"/>

  <rsc_order id="drbd-before-filesystem" action="start"
from="filesystem-drbd0" type="after" to_action="start" to="ms-drbd0"/>

  <rsc_order id="ip-after-filesystem-drbd0" action="start" from="ip"
type="after" to_action="start" to="filesystem-drbd0"/>

  <rsc_colocation id="filesystem-together-with-drbd-master"
from="filesystem-drbd0" to="ms-drbd0" to_role="Master" score="INFINITY"/>
</constraints>

Without knowing the symptoms it is difficult to say. I wonder if you might be missing the to_action="promote" on the order constraints. FWIW I've included a few constraints from what appears to be a similar setup to yours.


<rsc_order id="drbd_before_mysql"       from="group_mysql" action="start"
   type="after" to="ms-drbd0"     to_action="promote"/>

<rsc_order id="drbd_before_iscsi"       from="group_iscsi" action="start"
   type="after" to="drbd_ocfs_id" to_action="promote"/>

<rsc_colocation id="colo_mysql_on_fs0"  from="group_mysql" to="ms-drbd0"
   to_role="master" score="INFINITY"/>

<rsc_colocation id="colo_ocfs_ms"       from="group_iscsi" to="drbd_ocfs_id"
   to_role="master" score="INFINITY"/>


BTW, those are my resources, just in case someone wonders:

<resources>
  <primitive id="ip" class="ocf" type="IPaddr" provider="heartbeat">
    <instance_attributes id="ia-ip">
      <attributes>
        <nvpair name="ip" value="193.0.1.191"
id="be0ce3d9-f8f9-419c-a0a7-94502f22304b"/>
      </attributes>
    </instance_attributes>
  </primitive>
  <master_slave id="ms-drbd0">
    <meta_attributes id="ma-ms-drbd0">
      <attributes>
        <nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>
        <nvpair id="ma-ms-drbd0-2" name="clone_node_max" value="1"/>
        <nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>
        <nvpair id="ma-ms-drbd0-4" name="master_node_max" value="1"/>
        <nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>
        <nvpair id="ma-ms-drbd0-6" name="globally_unique" value="false"/>
        <nvpair name="target_role" id="ma-ms-drbd0-7" value="#default"/>
      </attributes>
    </meta_attributes>
    <primitive id="drbd0" class="ocf" provider="heartbeat" type="drbd">
      <instance_attributes id="ia-drbd0">
        <attributes>
          <nvpair id="ia-drbd0-1" name="drbd_resource" value="drbd0"/>
        </attributes>
      </instance_attributes>
    </primitive>
  </master_slave>
  <primitive class="ocf" provider="heartbeat" type="Filesystem"
id="filesystem-drbd0">
    <meta_attributes id="ma-fs0">
      <attributes>
        <nvpair name="target_role" id="ma-fs0-1" value="#default"/>
      </attributes>
    </meta_attributes>
    <instance_attributes id="ia-fs0">
      <attributes>
        <nvpair id="ia-fs0-1" name="fstype" value="ext2"/>
        <nvpair id="ia-fs0-2" name="directory" value="/opt"/>
        <nvpair id="ia-fs0-3" name="device" value="/dev/drbd0"/>
      </attributes>
    </instance_attributes>
  </primitive>
</resources>

Kind regards


   -- Michael
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to