When I CHANGE MASTER TO MASTER_HOST='' on both nodes, I can get a master/slave in pacemaker, as follows:<br><br>============<br>Last updated: Sat Oct 22 13:17:26 2011<br>Stack: Heartbeat<br>Current DC: vsaas-test-web-2 (b06e9042-c6a8-4acd-b81e-23728214a30a) - partition with quorum<br>
Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd<br>4 Nodes configured, unknown expected votes<br>1 Resources configured.<br>============<br><br>Node vsaas-test-web-1 (ee3e7d7e-7828-42c1-b093-b732fc3a2877): standby<br>
Node vsaas-test-web-2 (b06e9042-c6a8-4acd-b81e-23728214a30a): standby<br>Online: [ vsaas-test-sql-1 vsaas-test-sql-2 ]<br><br> Master/Slave Set: ms_mysql<br> Masters: [ vsaas-test-sql-1 ]<br> Slaves: [ vsaas-test-sql-2 ]<br>
<br>But, no replication from vsaas-test-sql-1 to vsaas-test-sql-2 and these errors in the log:<br><br>111022 13:04:56 [Note] Event Scheduler: Purging the queue. 0 events<br>111022 13:04:56 InnoDB: Starting shutdown...<br>
111022 13:04:57 InnoDB: Shutdown completed; log sequence number 0 44293<br>111022 13:04:57 [Note] /usr/sbin/mysqld: Shutdown complete<br><br>111022 13:09:18 [Note] Plugin 'FEDERATED' is disabled.<br>111022 13:09:18 InnoDB: Started; log sequence number 0 44293<br>
111022 13:09:18 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=vsaas-test-sql-1-relay-bin' to avoid this problem.<br>
111022 13:09:18 [Note] Event Scheduler: Loaded 0 events<br>111022 13:09:18 [Note] /usr/sbin/mysqld: ready for connections.<br>Version: '5.1.49-1ubuntu8.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)<br>
111022 13:09:18 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000001' at position 106, relay log './vsaas-test-sql-1-relay-bin.000010' position: 4<br>111022 13:09:18 [ERROR] Slave I/O: error connecting to master 'slaveuser@vsaas-test-sql-2:3306' - retry-time: 60 retries: 86400, Error_code: 2013<br>
111022 13:09:45 [Note] Slave I/O thread killed while connecting to master<br>111022 13:09:45 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000001', position 106<br>111022 13:09:45 [Note] Error reading relay log event: slave SQL thread was killed<br>
111022 13:09:50 [Note] 'CHANGE MASTER TO executed'. Previous state master_host='vsaas-test-sql-2', master_port='3306', master_log_file='mysql-bin.000001', master_log_pos='106'. New state master_host='', master_port='3306', master_log_file='', master_log_pos='4'.<br>
111022 13:10:58 [Note] /usr/sbin/mysqld: Normal shutdown<br><br>111022 13:10:58 [Note] Event Scheduler: Purging the queue. 0 events<br>111022 13:10:58 InnoDB: Starting shutdown...<br>111022 13:11:03 InnoDB: Shutdown completed; log sequence number 0 44293<br>
111022 13:11:03 [Note] /usr/sbin/mysqld: Shutdown complete<br><br>111022 13:11:29 [Note] Plugin 'FEDERATED' is disabled.<br>111022 13:11:29 InnoDB: Started; log sequence number 0 44293<br>111022 13:11:29 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=mysqld-relay-bin' to avoid this problem.<br>
111022 13:11:29 [ERROR] Failed to open the relay log './vsaas-test-sql-1-relay-bin.000001' (relay_log_pos 4)<br>111022 13:11:29 [ERROR] Could not find target log during relay log initialization<br>111022 13:11:29 [ERROR] Failed to initialize the master info structure<br>
111022 13:11:29 [Note] Event Scheduler: Loaded 0 events<br>111022 13:11:29 [Note] /usr/sbin/mysqld: ready for connections.<br>Version: '5.1.49-1ubuntu8.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)<br>
<br><div class="gmail_quote">On Sat, Oct 22, 2011 at 3:34 PM, Raoul Bhatia [IPAX] <span dir="ltr"><<a href="mailto:r.bhatia@ipax.at">r.bhatia@ipax.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hi!<div class="im"><br>
<br>
On 22.10.2011 20:33, Michael Marrotte wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
primitive p_mysql ocf:heartbeat:mysql \<br>
params binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf"<br>
replication_user="slaveuser" replication_passwd="slavepw"<br>
test_passwd="root" pid="/var/run/mysqld/mysqld.<u></u>pid"<br>
socket="/var/run/mysqld/<u></u>mysqld.sock" \<br>
params additional_parameters="--skip-<u></u>slave-start" \<br>
op start interval="0" timeout="120" \<br>
op stop interval="0" timeout="120" \<br>
op promote interval="0" timeout="120" \<br>
op demote interval="0" timeout="120" \<br>
op monitor interval="30" timeout="30" OCF_CHECK_LEVEL="1"<br>
ms ms_mysql p_mysql \<br>
meta notify="true" master-max="2" clone-max="2" target-role="Started"<br>
property $id="cib-bootstrap-options" \<br>
dc-version="1.0.8-<u></u>042548a451fce8400660f6031f4da6<u></u>f0223dd5dd" \<br>
cluster-infrastructure="<u></u>Heartbeat" \<br>
stonith-enabled="false" \<br>
no-quorum-policy="ignore" \<br>
last-lrm-refresh="1319301867"<br>
</blockquote>
<br></div>
master-max should be set to 1 if you're using a master-slave mysql<br>
setup.<br>
<br>
you can leave most replication related configuration out of your<br>
mysql config files. except for the server-id i think.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When I start ms_sql, I'm getting the following:<br>
<br>
Failed actions:<br>
p_mysql:0_start_0 (node=vsaas-test-sql-1, call=73, rc=1,<br>
status=complete): unknown error<br>
p_mysql:1_start_0 (node=vsaas-test-sql-2, call=63, rc=1,<br>
status=complete): unknown error<br>
</blockquote>
<br></div>
do all of the above files/paths exist?<br>
my configuration looks this:<br>
<br>
primitive wdb-mysql ocf:heartbeat:mysql \<br>
op monitor interval="30" timeout="30" \<br>
op monitor interval="300" timeout="30" OCF_CHECK_LEVEL="10" \<br>
op monitor interval="301" role="Master" timeout="30" OCF_CHECK_LEVEL="10" \<br>
op monitor interval="31" role="Slave" timeout="30" OCF_CHECK_LEVEL="10" \<br>
op monitor interval="15" role="Slave" timeout="30" \<br>
op monitor interval="10" role="Master" timeout="30" \<div class="im"><br>
op start interval="0" timeout="120" \<br>
op stop interval="0" timeout="120" \<br></div>
params config="/etc/mysql/my.cnf" datadir="/data/db/mysql/data/" socket="/var/run/mysqld/<u></u>mysqld.sock" binary="/usr/sbin/mysqld" additional_parameters="--<u></u>basedir=/usr --skip-external-locking --log-bin=/data/db/mysql/log/<u></u>mysql-bin.log --relay-log=mysqld-relay-bin " pid="/var/run/mysqld/mysqld.<u></u>pid" test_table="nagiostest.test_<u></u>table" test_user="nagios" test_passwd="xxxx" replication_user="ruser" replication_passwd="rpass"<br>
<br>
which version of the mysql ra/which resource agent release do you use?<br>
<br>
and please provide the log files! otherwise, its hard to correctly<br>
diagnose the problem.<br>
<br>
cheers,<br>
raoul<br>
<br>
______________________________<u></u>_________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/<u></u>mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/<u></u>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-<u></u>foundation.org/enter_bug.cgi?<u></u>product=Pacemaker</a><br>
</blockquote></div><br>