[Pacemaker] MySQL HA with pacemaker and DRBD - How to monitor mysql service

coma coma.inf at gmail.com
Thu Mar 22 10:23:53 EDT 2012


Thank you for your responses,

I have added the migration-treshold on my mysqld ressource, when i kill or
manually stop mysql on one node, there is not failover on the second node.
Also, when i look crm_mon --failcounts, i can see "mysqld:
migration-threshold=1000000 fail-count=1000000", so i don"t anderstand why
migration-threshold not equal 2?

Migration summary:
* Node node1:
   mysqld: migration-threshold=1000000 fail-count=1000000
* Node node2:

Failed actions:
    mysqld_monitor_10000 (node=node1, call=90, rc=7, status=complete): not
running
    mysqld_stop_0 (node=node1, call=93, rc=1, status=complete): unknown
error



configuration:

node node1 \
        attributes standby="off"
node node2 \
        attributes standby="off"
primitive Cluster-VIP ocf:heartbeat:IPaddr2 \
        params ip="x.x.x.x" broadcast="x.x.x.x" nic="eth0"
cidr_netmask="21" iflabel="VIP1" \
        op monitor interval="10s" timeout="20s" \
        meta is-managed="true"
primitive datavg ocf:heartbeat:LVM \
        params volgrpname="datavg" exclusive="true" \
        op start interval="0" timeout="30" \
        op stop interval="0" timeout="30"
primitive drbd_mysql ocf:linbit:drbd \
        params drbd_resource="drbd-mysql" \
        op monitor interval="15s"
primitive fs_mysql ocf:heartbeat:Filesystem \
        params device="/dev/datavg/data" directory="/data" fstype="ext3"
primitive mysqld lsb:mysqld \
        op monitor interval="10s" timeout="30s" \
        op start interval="0" timeout="120" \
        op stop interval="0" timeout="120" \
        meta target-role="Started" migration-threshold="2"
failure-timeout="20s"
group mysql datavg fs_mysql Cluster-VIP mysqld
ms ms_drbd_mysql drbd_mysql \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
location master-prefer-node-1 Cluster-VIP 25: node1
colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start
property $id="cib-bootstrap-options" \
        dc-version="1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f"
\
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
        last-lrm-refresh="1332425337"
rsc_defaults $id="rsc-options" \
        resource-stickiness="100"



2012/3/22 Andreas Kurz <andreas at hastexo.com>

> On 03/22/2012 01:51 PM, coma wrote:
> > Ah yes thank you, the service status mysql is now monitored, but the
> > failover is not performed?
>
> As long as local restarts are successful there is no need for a failover
> ... there is migration-treshold to limit local restart tries.
>
> Regards,
> Andreas
>
> --
> Need help with Pacemaker?
> http://www.hastexo.com/now
>
> >
> >
> >
> > 2012/3/22 emmanuel segura <emi2fast at gmail.com <mailto:emi2fast at gmail.com
> >>
> >
> >     sorry
> >     I think you missed the op monitor operetion in your primitive
> definition
> >
> >
> >
> >     Il giorno 22 marzo 2012 11:52, emmanuel segura <emi2fast at gmail.com
> >     <mailto:emi2fast at gmail.com>> ha scritto:
> >
> >         I think you missed the op monitor operetion you primitive
> definition
> >
> >         Il giorno 22 marzo 2012 11:33, coma <coma.inf at gmail.com
> >         <mailto:coma.inf at gmail.com>> ha scritto:
> >
> >             Hello,
> >
> >             I have a question about mysql service monitoring into a
> >             MySQL HA cluster with pacemaker and DRBD,
> >             I have set up a configuration to allow a failover between
> >             two nodes, it work fine when a node is offline (or standby),
> >             but i want to know if it is possible to monitor the mysql
> >             service to perform a failover if mysql is stopped or
> >             unavailable?
> >
> >             Thank you in advance for any response.
> >
> >             My crm configuration:
> >
> >             node node1 \
> >                     attributes standby="off"
> >             node node2 \
> >                     attributes standby="off"
> >             primitive Cluster-VIP ocf:heartbeat:IPaddr2 \
> >                     params ip="x.x.x.x" broadcast="x.x.x.x" nic="eth0"
> >             cidr_netmask="21" iflabel="VIP1" \
> >                     op monitor interval="10s" timeout="20s" \
> >                     meta is-managed="true"
> >             primitive datavg ocf:heartbeat:LVM \
> >                     params volgrpname="datavg" exclusive="true" \
> >                     op start interval="0" timeout="30" \
> >                     op stop interval="0" timeout="30"
> >             primitive drbd_mysql ocf:linbit:drbd \
> >                     params drbd_resource="drbd-mysql" \
> >                     op monitor interval="15s"
> >             primitive fs_mysql ocf:heartbeat:Filesystem \
> >                     params device="/dev/datavg/data" directory="/data"
> >             fstype="ext3"
> >             primitive mysqld lsb:mysqld
> >             group mysql datavg fs_mysql Cluster-VIP mysqld
> >             ms ms_drbd_mysql drbd_mysql \
> >                     meta master-max="1" master-node-max="1"
> >             clone-max="2" clone-node-max="1" notify="true"
> >             location master-prefer-node-1 Cluster-VIP 25: node1
> >             colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
> >             order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start
> >             property $id="cib-bootstrap-options" \
> >
> >
> dc-version="1.1.5-1.1.el5-01e86afaaa6d4a8c4836f68df80ababd6ca3902f"
> >             \
> >                     cluster-infrastructure="openais" \
> >                     expected-quorum-votes="2" \
> >                     stonith-enabled="false" \
> >                     no-quorum-policy="ignore" \
> >                     last-lrm-refresh="1332254494"
> >             rsc_defaults $id="rsc-options" \
> >                     resource-stickiness="100"
> >
> >
> >             _______________________________________________
> >             Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >             <mailto:Pacemaker at oss.clusterlabs.org>
> >             http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> >             Project Home: http://www.clusterlabs.org
> >             Getting started:
> >             http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >             Bugs: http://bugs.clusterlabs.org
> >
> >
> >
> >
> >         --
> >         esta es mi vida e me la vivo hasta que dios quiera
> >
> >
> >
> >
> >     --
> >     esta es mi vida e me la vivo hasta que dios quiera
> >
> >     _______________________________________________
> >     Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> >     <mailto:Pacemaker at oss.clusterlabs.org>
> >     http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> >     Project Home: http://www.clusterlabs.org
> >     Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> >     Bugs: http://bugs.clusterlabs.org
> >
> >
> >
> >
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
>
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120322/92d57914/attachment-0003.html>


More information about the Pacemaker mailing list