I think I have found out my problem though: I didn't put the resource
location stuff for pingd. I added this snippet to the CIB to constrain
the master-slave drbd resource to not run on a node with lost
connectivity and so far in my tests it seems to work:

<rsc_location id="drbd_id:connected" rsc="ms-drbd_id">
  <rule id="drbd_id:connected:rule" score="-INFINITY" boolean_op="or">
    <expression id="drbd_id:connected:expr:undefined" attribute="pingd" 
operation="not_defined"/>
    <expression id="drbd_id:connected:expr:zero" attribute="pingd" operation="lte" 
value="0"/>
  </rule>
</rsc_location>

Slightly OT, but with this config: consider that if all your ping nodes are down, your resource will not run anywhere. If thats okay with you, stay with that config.

Otherwise you might want to set something like this:

   <rsc_location id="res-connected" rsc="res">
     <rule role="master" id="res-connected-rule" score_attribute="ping1">
<expression id="res-connected-rule-1" attribute="pingd" operation="defined"/>
     </rule>
   </rsc_location>

This will *add* the pingd attributes value to the score for the master role. If pingd loses connectivity, this will be expressed in a lower score (as the pingd attribute value is 0 then). If the other node has a higher score, the resource will be migrated.

You will have to play around with the pingd multiplier according to your number of ping nodes to get those values right. You can use my showscores script to see the scores and test: http://wiki.linux-ha.org/ScoreCalculation#head-4355c45fc51c60c8e0f8a063bdc4069fdc17f761

and when I put the master in stanby the resources are correctly
migrated. Same goes when I poweroff the master or yank the eth0
network cable. I still haver issues about failover as it seems that
'auto_failback off' is not honored correctly.

That is a R1 configuration option. It does nothing in R2 (crm) mode. Read http://wiki.linux-ha.org/ScoreCalculation and set an appropriate value for resource stickiness. This way you can achieve a behaviour as with "auto_failback off" in R1.

Regards
Dominik
_______________________________________________
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