[Linux-HA] Can't get the ping_group to work - problem with location constraints and DRBD

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Jan 30 04:16:12 MST 2009


Hi,

On Fri, Jan 30, 2009 at 11:35:54AM +0100, Tobias Appel wrote:
> Hi,
> 
> I'm using Heartbeat 2.1.4 and I tried to setup a ping_group so that if I
> pull the ethernet cables on one of the two nodes a failover will occur.
> 
> I have configured a ping_group group 1 in ha.cf and created a clone
> resource with pingd.
> 
> The problem is, I have a resource group + a master / slave resource for
> DRBD. the resource group only runs on the node which is currently
> master. Now I added another constraint for pingd, so that the failover
> occurs, but it does not work - nothing is happening, I think it has to
> do with the DRBD resource. Here are my current constraints:
> 
>  <constraints>
>    <rsc_order id="order_drbd_filesys" from="nagios" action="start"
> to="ms_drbd" to_action="promote"/>
>    <rsc_colocation id="colocation_drbd_filesys" to_role="Master"
> from="nagios" to="ms_drbd" score="INFINITY"/>
>    <rsc_location id="location_resources" rsc="ms_drbd">
>      <rule id="prefered_location_resources" score_attribute="pingd">
>        <expression attribute="pingd"
> id="66155d1f-2210-45ad-9010-a14e48825ead" operation="defined"/>
>      </rule>
>    </rsc_location>
>  </constraints>
> 
> I'm not quite sure how to change the location constraint to the
> following:
> -if you are the active node and the ping group is not reachable, stop
> resource group "nagios"
> - promote the other node to master for ms_drbd and start resource group
> nagios there

Add role=Master to the pingd location constraint. I think this
was also described in the drbd howto.

> The logfile looks like this (especially line 3 mentions the problem with
> DRBD master):
> 
> Jan 30 10:24:12 nagios2 pengine: [3758]: WARN: text2task: Unsupported
> action: status

You should use monitor, not status. Don't know what does your
configuration look like.

Thanks,

Dejan

> Jan 30 10:24:12 nagios2 pengine: [3758]: info: master_color: Promoting
> resource_drbd:0 (Master nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: info: master_color: ms_drbd:
> Promoted 1 instances of a possible 1 to master
> Jan 30 10:24:12 nagios2 pengine: [3758]: info: master_color: ms_drbd:
> Promoted 1 instances of a possible 1 to master
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_filesys  (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource nagios-vip        (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_http     (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_mysql    (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource nagios-core       (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: WARN: text2task: Unsupported
> action: status
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource MailNotify        (Started nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_drbd:0   (Master nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_drbd:1   (Slave nagios1)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_drbd:0   (Master nagios2)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_drbd:1   (Slave nagios1)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_pingd:0  (Started nagios1)
> Jan 30 10:24:12 nagios2 pengine: [3758]: notice: NoRoleChange: Leave
> resource resource_pingd:1  (Started nagios2)
> 
> 
> on a side note, I wonder what text2task is...this error comes frequently
> in my /var/log/messages...
> 
> 
> any help is appreciated.
> 
> bye,
> tobi
> 
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


More information about the Linux-HA mailing list