Apparently commiting even if it complains that the slb resource does not exist, works. I have it working now with SLB instead of ocf: heartbeat.<br><br>The next thing I&#39;m trying to do is that if the cluster detects that the primary node has MySQL down, to switch it&#39;s service IP to the other node.<br>
Is there an easy way to do that?<br><br><div class="gmail_quote">2010/2/22 Dejan Muhamedagic <span dir="ltr">&lt;<a href="mailto:dejanmm@fastmail.fm">dejanmm@fastmail.fm</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<div><div></div><div class="h5"><br>
On Fri, Feb 19, 2010 at 02:19:15PM -0300, Lior Marantenboim wrote:<br>
&gt; Hello everyone<br>
&gt;<br>
&gt; I&#39;ve having trouble trying to set up a simple MySQL failover (make Pacemaker<br>
&gt; start it on one node, and if it shuts down, start it on the other). CRM<br>
&gt; shows as if MySQL is not running but it actually is, and since it doesn&#39;t<br>
&gt; see it that way, it tries to start it on the other node as well.<br>
&gt; I&#39;m using Debian Lenny, corosync 1.2.0, Pacemaker 1-0-051b78d5f321 and<br>
&gt; cluster glue<br>
&gt;<br>
&gt; Thanks for any help!<br>
&gt;<br>
&gt; This is my setup:<br>
&gt;<br>
&gt; hpblade02:~# crm configure show<br>
&gt; node hpblade01<br>
&gt; node hpblade02 \<br>
&gt;     attributes standby=&quot;off&quot;<br>
&gt; primitive MySQLIP ocf:heartbeat:IPaddr \<br>
&gt;     params ip=&quot;10.10.99.57&quot; cidr_netmask=&quot;32&quot; \<br>
&gt;     op monitor interval=&quot;30s&quot; \<br>
&gt;     meta target-role=&quot;Started&quot;<br>
&gt; primitive mysql ocf:heartbeat:mysql \<br>
&gt;     op monitor interval=&quot;30s&quot; timeout=&quot;60s&quot; \<br>
&gt;     meta target-role=&quot;Started&quot;<br>
&gt; location cli-prefer-mysql mysql \<br>
&gt;     rule $id=&quot;cli-prefer-rule-mysql&quot; inf: #uname eq hpblade01<br>
&gt; property $id=&quot;cib-bootstrap-options&quot; \<br>
&gt;     dc-version=&quot;1.0.7-051b78d5f32195bd9d83447343606211993169e7&quot; \<br>
&gt;     cluster-infrastructure=&quot;openais&quot; \<br>
&gt;     expected-quorum-votes=&quot;2&quot; \<br>
&gt;     stonith-enabled=&quot;false&quot; \<br>
&gt;     no-quorum-policy=&quot;ignore&quot; \<br>
&gt;     last-lrm-refresh=&quot;1266599381&quot;<br>
&gt; rsc_defaults $id=&quot;rsc-options&quot; \<br>
&gt;     resource-stickiness=&quot;100&quot;<br>
&gt; hpblade02:~#<br>
&gt;<br>
&gt; And here is crm_mon output:<br>
&gt;<br>
&gt; hpblade02:~# crm_mon<br>
&gt; Defaulting to one-shot mode<br>
&gt; You need to have curses available at compile time to enable console mode<br>
&gt; ============<br>
&gt; Last updated: Fri Feb 19 14:16:30 2010<br>
&gt; Stack: openais<br>
&gt; Current DC: hpblade01 - partition with quorum<br>
&gt; Version: 1.0.7-051b78d5f32195bd9d83447343606211993169e7<br>
&gt; 2 Nodes configured, 2 expected votes<br>
&gt; 2 Resources configured.<br>
&gt; ============<br>
&gt;<br>
&gt; Online: [ hpblade01 hpblade02 ]<br>
&gt;<br>
&gt;  MySQLIP    (ocf::heartbeat:IPaddr):    Started hpblade01<br>
&gt;<br>
&gt; Failed actions:<br>
&gt;     mysql_start_0 (node=hpblade01, call=22, rc=-2, status=Timed Out):<br>
&gt; unknown exec error<br>
&gt;     mysql_start_0 (node=hpblade02, call=24, rc=-2, status=Timed Out):<br>
&gt; unknown exec error<br>
<br>
</div></div>This contradicts the statement above, i.e. the start action timed<br>
out. It may be that mysql actually started, but then monitor<br>
failed. Don&#39;t have the details. If it takes a long time for the<br>
database to start, then increase the start operation timeout<br>
(defaults to 20 sec, from the default-action-timeout property).<br>
Check the logs for any mysql messages (incl. those relayed by<br>
lrmd). If you can&#39;t figure out what&#39;s going on, make a hb_report<br>
and post it.<br>
<br>
Thanks,<br>
<br>
Dejan<br>
<br>
&gt; hpblade02:~#<br>
<div><div></div><div class="h5"><br>
&gt; _______________________________________________<br>
&gt; Pacemaker mailing list<br>
&gt; <a href="mailto:Pacemaker@oss.clusterlabs.org">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>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list<br>
<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>
</div></div></blockquote></div><br>