I have a 2-node MySQL master/slave to master/slave setup and am looking to add a MySQL "health" check that can take a node out of the cluster if its slave is unhealthy, e.g. out of sync. The master/slave master/slave config is working fine, hence writes in either node are replicated to the other node. To add Pacemaker into the mix, I configure ha.cf appropriately, shutdown MySQL and configure Pacemaker resources as follows:
primitive p_mysql ocf:heartbeat:mysql \ params binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf" replication_user="slaveuser" replication_passwd="slavepw" test_passwd="root" pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" \ params additional_parameters="--skip-slave-start" \ 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="30" timeout="30" OCF_CHECK_LEVEL="1" ms ms_mysql p_mysql \ meta notify="true" master-max="2" clone-max="2" target-role="Started" property $id="cib-bootstrap-options" \ dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \ cluster-infrastructure="Heartbeat" \ stonith-enabled="false" \ no-quorum-policy="ignore" \ last-lrm-refresh="1319301867" When I start ms_sql, I'm getting the following: Failed actions: p_mysql:0_start_0 (node=vsaas-test-sql-1, call=73, rc=1, status=complete): unknown error p_mysql:1_start_0 (node=vsaas-test-sql-2, call=63, rc=1, status=complete): unknown error Not much in ha-debug that looked relevant... In using ocf_heartbeat_mysql, I'm not completely sure where MySQL leaves off and Pacemaker picks up. Should I remove all master/slave config from my nodes and Pacemaker will auot-config or does Pacemaker expect a pre-configured system (master/salve) and simply controls starting, stopping, monitoring, etc... Is the above config seem adequate to handle a master/slave <-> master/slave config? Does anyone have an example MySQL/Pacemaker to setup this type of configuration? Any help is greatly appreciated. Thanks, ~Mike M.
_______________________________________________ Pacemaker mailing list: Pacemaker@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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker