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>

Many thanks in advance for helping me with this.

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
-- 
Luis Motta Campos (a.k.a. Monsieur Champs) is a software engineer,
Perl fanatic evangelist, and amateur {cook, photographer}

_______________________________________________
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