Hi, On Sat, Aug 13, 2011 at 2:53 AM, Michael Szilagyi <[email protected]> wrote: > I'm new to Pacemaker and trying to understand exactly what it can and can't > do. > I currently have a small, mysql master/slave cluster setup that is getting > monitored within Heartbeat/Pacemaker: What I'd like to be able to do (and > am hoping Pacemaker will do) is to have 1 node designated as Master and in > the event of a failure, automatically promote a slave to master and realign > all of the existing slaves to be slaves of the newly promoted master. > Currently what seems to be happening, however, is heartbeat correctly sees > that a node goes down and pacemaker promotes it up to master but the > replication is not adjusted so that it is now feeding everyone else. It > seems like this should be possible to do from within Pacemaker but I feel > like I'm missing a part of the puzzle. Any suggestions would be > appreciated.
You could try the mysql RA => from https://github.com/fghaas/resource-agents/blob/master/heartbeat/mysql Last I heard, it had replication support. HTH. > > Here's an output of my crm configure show: > node $id="7deca2cd-9a64-476c-8ea2-372bca859a4f" four \ > attributes 172.17.0.130-log-file-p_sql="mysql-bin.000013" > 172.17.0.130-log-pos-p_sql="632" > node $id="9b355ab7-8c81-485c-8dcd-1facedde5d03" three \ > attributes 172.17.0.131-log-file-p_sql="mysql-bin.000020" > 172.17.0.131-log-pos-p_sql="106" > primitive p_sql ocf:heartbeat:mysql \ > params config="/etc/mysql/my.cnf" binary="/usr/bin/mysqld_safe" > datadir="/var/lib/mysql" \ > params pid="/var/lib/mysql/novaSQL.pid" socket="/var/run/mysqld/mysqld.sock" > \ > params max_slave_lag="120" \ > params replication_user="novaSlave" replication_passwd="nova" \ > params additional_parameters="--skip-external-locking > --relay-log=novaSQL-relay-bin --relay-log-index=relay-bin.index > --relay-log-info-file=relay-bin.info" \ > op start interval="0" timeout="120" \ > op stop interval="0" timeout="120" \ > op promote interval="0" timeout="120" \ > op demote interval="0" timeout="120" \ > op monitor interval="10" role="Master" timeout="30" \ > op monitor interval="30" role="Slave" timeout="30" > primitive p_sqlIP ocf:heartbeat:IPaddr2 \ > params ip="172.17.0.96" \ > op monitor interval="10s" > ms ms_sql p_sql \ > meta target-role="Started" is-managed="true" > location l_sqlMaster p_sqlIP 10: three > location l_sqlSlave1 p_sqlIP 5: four > property $id="cib-bootstrap-options" \ > dc-version="1.0.9-unknown" \ > cluster-infrastructure="Heartbeat" \ > stonith-enabled="false" \ > no-quorum-policy="ignore" \ > last-lrm-refresh="1313187103" > > Thanks! > -Mike. > _______________________________________________ > Pacemaker mailing list: [email protected] > 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker > > -- Dan Frincu CCNA, RHCE _______________________________________________ Pacemaker mailing list: [email protected] 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
