Hello.<div>Check it out <a href="https://code.launchpad.net/percona-prm">https://code.launchpad.net/percona-prm</a>. </div><div>And presentation: <a href="http://www.percona.com/files/presentations/percona-live/nyc-2011/PerconaLiveNYC2011-MySQL-High-Availability-with-Pacemaker.pdf">http://www.percona.com/files/presentations/percona-live/nyc-2011/PerconaLiveNYC2011-MySQL-High-Availability-with-Pacemaker.pdf</a><br>
<div><br><div class="gmail_quote">2011/8/15 Michael Szilagyi <span dir="ltr">&lt;<a href="mailto:mszilagyi@gmail.com">mszilagyi@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;m already using the mysql RA file from <a href="https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/mysql" target="_blank">https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/mysql</a> (which also seems to have replication support in it).<div>


<br></div><div>Basically what seems to be happening is that pacemaker detects that the master has dropped and promotes a slave up to master.  However, it is not properly reconfiguring the slaves with a CHANGE MASTER TO.  I can see some lines in the ocf file that relate to changing master but it isn&#39;t setting it up properly.  If I login to the slave and issue a CHANGE MASTER TO ... / START SLAVE then replication will start up normally again.</div>


<div><br></div><div>Since I can see that the script does allow the master host to get set when going through set/unset_master I&#39;m hoping it&#39;s just something I&#39;m missing and not a limitation of using Pacemaker to manage the sql replication cluster.<br>


<br></div><div>Hopefully someone can point me at what I am missing.</div><div><br></div><div>-Mike.</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Mon, Aug 15, 2011 at 1:56 AM, Dan Frincu <span dir="ltr">&lt;<a href="mailto:df.cluster@gmail.com" target="_blank">df.cluster@gmail.com</a>&gt;</span> wrote:<br>


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