[Linux-HA] Rsc_location based on a clone monitoring
Andrew Beekhof
beekhof at gmail.com
Fri May 18 03:16:17 MDT 2007
On 4/20/07, Benjamin Lawetz <blawetz at teliphone.ca> wrote:
> I have a 2 node setup giving HA for an IP for mysql servers.
> The Mysql servers are replicating and therefore should always be running. So
> I don't want them to be managed by heartbeat. But I do need the monitoring.
> So I made a classic 2 node IP sharing with pingd clones to check for it's
> connectivity.
>
> I have resource location rules that move the IP away from a node that has no
> connectivity. I wanted to also remove the IP from the node if it's mysql
> monitoring fails. To do this I've modified the mysql resource script that
> was provided to limit it to just monitoring (using a dummy start,stop and
> status).
I think you'd be better off with an ordering constraint. Such that if
mysql is stopped, then so is the IP.
>
> This works fine and with the following setup I detect if the mysql server is
> working or not. The thing I wondering how to do is how to fail the IP if the
> mysql server is not working. How could I write a resource location rule to
> take into account the status of the clone monitoring?
you mean the pingd result? or something else?
> Is there a variable I
> can access somewhere ?
> One way of doing it I thought of was running the attrd_updater in the mysql
> monitoring script to update a variable that I check in the rsc_location.
yep, that would work.
have the mysql start, stop and monitor actions update mysql_running :=
(true|false)
and then have the score=-INFINITY and the rule check for neq=true
> But
> is there a better way that I haven't thought of ?
>
> Thanks
>
> <clone id="mysql-mod">
> <instance_attributes id="mysql-mod">
> <attributes>
> <nvpair id="mysql-mod-clone_node_max" name="clone_node_max"
> value="1"/>
> </attributes>
> </instance_attributes>
> <primitive id="mysql-mod-child" provider="heartbeat" class="ocf"
> type="mysql-mod">
> <operations>
> <op id="mysql-mod-child-monitor" name="monitor" interval="20s"
> timeout="40s" prereq="nothing">
> <instance_attributes id="mysql-mod-child-monitor-attr">
> <attributes>
> <nvpair id="mysql-mod-child-monitor-attr-check_level"
> name="OCF_CHECK_LEVEL" value="2"/>
> </attributes>
> </instance_attributes>
> </op>
> <op id="mysql-mod-child-start" name="start" prereq="nothing"/>
> </operations>
> </primitive>
> </clone>
>
>
>
> --
> Benjamin
> TéliPhone inc.
>
>
> --------------
> N'envoyé pas de courriel à l'adresse qui suit, sinon vous serez
> automatiquement mis sur notre liste noire.
> honeypot at teliphone.ca
> Do not send an email to the email above or you will automatically be
> blacklisted.
>
> _______________________________________________
> 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