Hi,<br><br><div class="gmail_quote">On Wed, May 18, 2011 at 11:30 AM, Max Williams <span dir="ltr"><<a href="mailto:Max.Williams@betfair.com">Max.Williams@betfair.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi Daniel,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">You might want to set “on-fail=standby” for the resource group or individual resources. This will put the host in to standby when a failure occurs thus preventing failback:</span></p>
</div></div></blockquote><div><br></div><div>This is not the most optimal solution.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-GB" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><a href="http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-operations.html#s-resource-failure" target="_blank">http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-resource-operations.html#s-resource-failure</a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Another option is to set resource stickiness which will stop resources moving back after a failure:</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><a href="http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch05s03s02.html" target="_blank">http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ch05s03s02.html</a></span></p>
</div></div></blockquote><div><br></div><div>That is set globally in his config.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-GB" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Also note if you are using a two node cluster you will also need the property “no-quorum-policy=ignore” set.</span></p>
</div></div></blockquote><div><br></div><div>This as well.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-GB" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hope that helps!</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Cheers,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Max</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> Daniel Bozeman [mailto:<a href="mailto:daniel.bozeman@americanroamer.com" target="_blank">daniel.bozeman@americanroamer.com</a>] <br>
<b>Sent:</b> 17 May 2011 19:09<br><b>To:</b> <a href="mailto:pacemaker@oss.clusterlabs.org" target="_blank">pacemaker@oss.clusterlabs.org</a><br><b>Subject:</b> Re: [Pacemaker] Preventing auto-fail-back</span></p></div></div>
<div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">To be more specific:</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I've tried following the example on page 25/26 of this document to the teeth: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a></p>
</div></div></div></div></div></blockquote><div><br></div><div>Well, not really, that's why there are errors in your config.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-GB" link="blue" vlink="purple"><div><div><div class="h5"><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">And it does work as advertised. When I stop corosync, the resource goes to the other node. I start corosync and it remains there as it should.</p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">However, if I simply unplug the ethernet connection, let the resource migrate, then plug it back in, it will fail back to the original node. Is this the intended behavior? It seems a bad NIC could wreck havoc on such a setup.</p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Thanks!</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Daniel</p></div><div><p class="MsoNormal"> </p></div><div><div><p class="MsoNormal">
On May 16, 2011, at 5:33 PM, Daniel Bozeman wrote:</p></div><p class="MsoNormal"><br><br></p><div><p class="MsoNormal">For the life of me, I cannot prevent auto-failback from occurring in a master-slave setup I have in virtual machines. I have a very simple configuration:<br>
<br>node $id="4fe75075-333c-4614-8a8a-87149c7c9fbb" ha2 \<br> attributes standby="off"<br>node $id="70718968-41b5-4aee-ace1-431b5b65fd52" ha1 \<br> attributes standby="off"<br>
primitive FAILOVER-IP ocf:heartbeat:IPaddr \<br> params ip="192.168.1.79" \<br> op monitor interval="10s"<br>primitive PGPOOL lsb:pgpool2 \<br> op monitor interval="10s"<br>
group PGPOOL-AND-IP FAILOVER-IP PGPOOL<br>colocation IP-WITH-PGPOOL inf: FAILOVER-IP PGPOOL<br>property $id="cib-bootstrap-options" \<br> dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \<br>
</p></div></div></div></div></div></div></blockquote><div><br></div><div>Change to cluster-infrastructure="openais"</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-GB" link="blue" vlink="purple"><div><div><div class="h5"><div><div><p class="MsoNormal"> cluster-infrastructure="Heartbeat" \<br> stonith-enabled="false" \<br> no-quorum-policy="ignore"<br>
</p></div></div></div></div></div></div></blockquote><div><br></div><div>You're missing expected-quorum-votes here, it should be expected-quorum-votes="2" and it's usually added automatically when the nodes are added/seen to/by the cluster, I assume it's related to the cluster-infrastructure="Heartbeat".</div>
<div><br></div><div>Regards,</div><div>Dan</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-GB" link="blue" vlink="purple"><div><div><div class="h5">
<div><div><p class="MsoNormal">rsc_defaults $id="rsc-options" \<br> resource-stickiness="1000"<br><br>No matter what I do with resource stickiness, I cannot prevent fail-back. I usually don't have a problem with failback when I restart the current master, but when I disable network connectivity to the master, everything fails over fine. Then I enable the network adapter and everything jumps back to the original "failed" node. I've done some "watch ptest -Ls"ing, and the scores seem to signify that failback should not occur. I'm also seeing resources bounce more times than necessary when a node is added (~3 times each) and resources seem to bounce when a node returns to the cluster even if it isn't necessary for them to do so. I also had an order directive in my configuration at one time, and often the second resource would start, then stop, then allow the first resource to start, then start itself. Quite weird. Any nods in the right direction would be greatly appreciated. I've scoured Google and read the official documentation to no avail. I suppose I should mention I am using heartbeat as well. My LSB resource implements start/stop/status properly without error.<br>
<br>I've been testing this with a floating IP + Postgres as well with the same issues. One thing I notice is that my "group" resources have no score. Is this normal? There doesn't seem to be any way to assign a stickiness to a group, and default stickiness has no effect.<br>
<br>Thanks!<br><br>Daniel Bozeman</p></div></div><p class="MsoNormal"> </p><div><p class="MsoNormal"><span><span style="font-size:13.5pt;color:black">Daniel Bozeman</span></span><span style="font-size:13.5pt;color:black"><br>
<span>American Roamer</span><br><span>Systems Administrator</span><br><span><a href="mailto:daniel.bozeman@americanroamer.com" target="_blank">daniel.bozeman@americanroamer.com</a></span></span> </p></div><p class="MsoNormal">
</p></div></div></div><br>
________________________________________________________________________<br>
In order to protect our email recipients, Betfair Group use SkyScan from <br>
MessageLabs to scan all Incoming and Outgoing mail for viruses.<br>
<br>
________________________________________________________________________<br>
</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"><br>-- <br>Dan Frincu<div>CCNA, RHCE</div><br>