[Pacemaker] Circular replication help needed - how to make sure VIP runs on same node with a healthy mysql

Attila Megyeri amegyeri at minerva-soft.com
Sat Nov 5 13:20:52 EDT 2011


I am having a hard time configuring a relatively simple mysql environment.

What I'd like to achieve is:

*         One master and a slave, with replication

*         Relatively quick failover if the master node, or Mysql fail.

I tried the Mysql cluster approach, but seemed to be too slow, and to many limitations (foreign keys, triggers, views, etc).

I decided to go with the Mysql replication.
Tried to use the mysql RA from clusterlabs 3.9.2 - but no luck, replicaiton simply did not work out.

The I tried the circular master/master replicaiton approach described in


This gave the best results so far, BUT.

With this approach, the VIP is floating over the two nodes and if mysql fails ont he node where the VIP is assigned, i am left without mysql

I read through all the archives and I did not find anyone else with this problem - is that possible? For me this seemed to be a very basic setup.

My question is: if i follow the circular Master/master replication approach, how can I make sure that the VIP is active on a node where I actually have a healty mysql running? Unfortunately i cannot reference a particular member of a clone.

My config is:

node db1 \
        attributes IP="" standby="off"
node db2 \
        attributes IP="" standby="off"
primitive mysql ocf:heartbeat:mysql \
        params binary="/usr/bin/mysqld_safe" config="/etc/mysql/my.cnf" datadir="/var/lib/mysql" user="mysql" pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" test_passwd="pass" test_table="replicatest.connectioncheck" test_user="slave_user" \
        op start interval="0" timeout="120s" \
        op stop interval="0" timeout="120s" \
        op monitor interval="10" timeout="30s" \
        meta migration-threshold="10"
primitive vip ocf:heartbeat:IPaddr2 \
        params lvs_support="true" ip="" cidr_netmask="8" broadcast="" \
        op monitor interval="20s" timeout="20s" \
        meta migration-threshold="10"
clone cl_mysql mysql \
        meta clone-max="2"
property $id="cib-bootstrap-options" \
        dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \

Thank you in advance!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111105/53b4891b/attachment-0002.html>

More information about the Pacemaker mailing list