[Pacemaker] MySQL Master/Slave replication issue

Yves Trudeau y.trudeau at videotron.ca
Wed Aug 1 20:21:19 EDT 2012


Hi Lyle,
   please enable the bash trace by creating the file 
/tmp/mysql.ocf.ra.debug/log.  I suspect you are missing something in 
your config.

Regards,

Yves

Le 2012-07-24 11:23, lyle at netcourrier.com a écrit :
>
> Hi,
>
> My configuration:
> - centos 5.8 x86_64
> - heartbeat 3.0.3
> - pacemaker 1.0.12
> - latest mysql agent (from github) (there is an error in log message in block 'pre-demote'. 'post-demote' is used and it's confusing in logs. I have done the change in the script)
>
> I have mysql in master/slave replication on 2 nodes (centreon-failover-dbmaster and centreon-failover-dbslave). In normal state, role 'master' is on 'centreon-failover-dbmaster' and 'slave' role is on 'centreon-failover-dbslave'. The procedure:
> - I halt the server 'centreon-failover-dbmaster' ('halt' command): it's ok. The role 'master' is switched on 'centreon-failover-dbslave' and there is no issue in replication (i have checked)
> - there is some writes on new MySQL masters
> - I start the server 'centreon-failover-dbmaster': it's not ok. I have a MySQL replication issue (duplicate entry key).
>
> Logs for 'centreon-failover-dbmaster': http://pastebin.com/kbTLYJE1
> Logs for 'centreon-failover-dbslave' : http://pastebin.com/Wf9R3inW
> Pacemaker global configuration: http://pastebin.com/mpbYfuKS
>
> When i'm reading logs, i have the following:
> - start server 'centreon-failover-dbmaster'
> - pre-demote, demote and post-demote mysql service on 'centreon-failover-dbslave'
> - start mysql service on 'centreon-failover-dbmaster': there is no master (indeed, 'centreon-failover-dbslave' is demoted) (log: 'No MySQL master present - clearing replication state')
> - promote mysql service on 'centreon-failover-dbmaster': 'centreon-failover-dbmaster' didn't get writes from 'centreon-failover-dbslave' :'(. That's the problem
> - post-promote mysql service on 'centreon-failover-dbslave': slave replication is activated (but the master is not consistent. And duplicate entry appears because 'centreon-failover-dbmaster' is late)
>
> The chain or script seems not good. Moreover, i would prefer to avoid an auto failback (master/slave role). When the master switches, how can i do to tell me to stay ? (like with the stickiness) I don't want a command after to use (because if the server is up before the command: database is not synced anymore)
>
> Thanks a lot.
>
> Best regards,
>
>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://bugs.clusterlabs.org
>






More information about the Pacemaker mailing list