[Pacemaker] Master/Master Setup
Michael Marrotte
marrotte at gmail.com
Sat Oct 22 20:20:14 UTC 2011
When I CHANGE MASTER TO MASTER_HOST='' on both nodes, I can get a
master/slave in pacemaker, as follows:
============
Last updated: Sat Oct 22 13:17:26 2011
Stack: Heartbeat
Current DC: vsaas-test-web-2 (b06e9042-c6a8-4acd-b81e-23728214a30a) -
partition with quorum
Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd
4 Nodes configured, unknown expected votes
1 Resources configured.
============
Node vsaas-test-web-1 (ee3e7d7e-7828-42c1-b093-b732fc3a2877): standby
Node vsaas-test-web-2 (b06e9042-c6a8-4acd-b81e-23728214a30a): standby
Online: [ vsaas-test-sql-1 vsaas-test-sql-2 ]
Master/Slave Set: ms_mysql
Masters: [ vsaas-test-sql-1 ]
Slaves: [ vsaas-test-sql-2 ]
But, no replication from vsaas-test-sql-1 to vsaas-test-sql-2 and these
errors in the log:
111022 13:04:56 [Note] Event Scheduler: Purging the queue. 0 events
111022 13:04:56 InnoDB: Starting shutdown...
111022 13:04:57 InnoDB: Shutdown completed; log sequence number 0 44293
111022 13:04:57 [Note] /usr/sbin/mysqld: Shutdown complete
111022 13:09:18 [Note] Plugin 'FEDERATED' is disabled.
111022 13:09:18 InnoDB: Started; log sequence number 0 44293
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.
111022 13:09:18 [Note] Event Scheduler: Loaded 0 events
111022 13:09:18 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-1ubuntu8.1' socket: '/var/run/mysqld/mysqld.sock' port:
3306 (Ubuntu)
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
111022 13:09:18 [ERROR] Slave I/O: error connecting to master
'slaveuser at vsaas-test-sql-2:3306' - retry-time: 60 retries: 86400,
Error_code: 2013
111022 13:09:45 [Note] Slave I/O thread killed while connecting to master
111022 13:09:45 [Note] Slave I/O thread exiting, read up to log
'mysql-bin.000001', position 106
111022 13:09:45 [Note] Error reading relay log event: slave SQL thread was
killed
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'.
111022 13:10:58 [Note] /usr/sbin/mysqld: Normal shutdown
111022 13:10:58 [Note] Event Scheduler: Purging the queue. 0 events
111022 13:10:58 InnoDB: Starting shutdown...
111022 13:11:03 InnoDB: Shutdown completed; log sequence number 0 44293
111022 13:11:03 [Note] /usr/sbin/mysqld: Shutdown complete
111022 13:11:29 [Note] Plugin 'FEDERATED' is disabled.
111022 13:11:29 InnoDB: Started; log sequence number 0 44293
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.
111022 13:11:29 [ERROR] Failed to open the relay log
'./vsaas-test-sql-1-relay-bin.000001' (relay_log_pos 4)
111022 13:11:29 [ERROR] Could not find target log during relay log
initialization
111022 13:11:29 [ERROR] Failed to initialize the master info structure
111022 13:11:29 [Note] Event Scheduler: Loaded 0 events
111022 13:11:29 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-1ubuntu8.1' socket: '/var/run/mysqld/mysqld.sock' port:
3306 (Ubuntu)
On Sat, Oct 22, 2011 at 3:34 PM, Raoul Bhatia [IPAX] <r.bhatia at ipax.at>wrote:
> hi!
>
>
> On 22.10.2011 20:33, Michael Marrotte wrote:
>
>> 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-**042548a451fce8400660f6031f4da6**f0223dd5dd" \
>> cluster-infrastructure="**Heartbeat" \
>> stonith-enabled="false" \
>> no-quorum-policy="ignore" \
>> last-lrm-refresh="1319301867"
>>
>
> master-max should be set to 1 if you're using a master-slave mysql
> setup.
>
> you can leave most replication related configuration out of your
> mysql config files. except for the server-id i think.
>
>
> 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
>>
>
> do all of the above files/paths exist?
> my configuration looks this:
>
> primitive wdb-mysql ocf:heartbeat:mysql \
> op monitor interval="30" timeout="30" \
> op monitor interval="300" timeout="30" OCF_CHECK_LEVEL="10" \
> op monitor interval="301" role="Master" timeout="30"
> OCF_CHECK_LEVEL="10" \
> op monitor interval="31" role="Slave" timeout="30"
> OCF_CHECK_LEVEL="10" \
> op monitor interval="15" role="Slave" timeout="30" \
> op monitor interval="10" role="Master" timeout="30" \
>
> op start interval="0" timeout="120" \
> op stop interval="0" timeout="120" \
> params config="/etc/mysql/my.cnf" datadir="/data/db/mysql/data/"
> socket="/var/run/mysqld/**mysqld.sock" binary="/usr/sbin/mysqld"
> additional_parameters="--**basedir=/usr --skip-external-locking
> --log-bin=/data/db/mysql/log/**mysql-bin.log --relay-log=mysqld-relay-bin
> " pid="/var/run/mysqld/mysqld.**pid" test_table="nagiostest.test_**table"
> test_user="nagios" test_passwd="xxxx" replication_user="ruser"
> replication_passwd="rpass"
>
> which version of the mysql ra/which resource agent release do you use?
>
> and please provide the log files! otherwise, its hard to correctly
> diagnose the problem.
>
> cheers,
> raoul
>
> ______________________________**_________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/**mailman/listinfo/pacemaker<http://oss.clusterlabs.org/mailman/listinfo/pacemaker>
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/**doc/Cluster_from_Scratch.pdf<http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf>
> Bugs: http://developerbugs.linux-**foundation.org/enter_bug.cgi?**
> product=Pacemaker<http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111022/28babc45/attachment.htm>
More information about the Pacemaker
mailing list