<br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 2:01 AM, Michael Powell <span dir="ltr"><<a href="mailto:Michael.Powell@harmonicinc.com" target="_blank">Michael.Powell@harmonicinc.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-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">I have recently assumed the responsibility for maintaining code on one of my company’s products that uses Pacemaker/Heartbeat. I’m still coming up to speed on this code, and would like to solicit comments about some particular behavior. For reference, the Pacemaker version is 1.0.9.1, and Heartbeat is version 3.0.3.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">This product uses two host systems, each of which supports several disk enclosures, operating in an “active/passive” mode. The two hosts are connected by redundant, dedicated 10Gb Ethernet links, which are used for messaging between them. The disks in each enclosure are controlled by an instance of an application called SS. If an “active” host’s SS application fails for some reason, then the corresponding application on the “passive” host will assume control of the disks. Each application is assigned a Pacemaker resource, and the resource agent communicates with the appropriate SS instance. For reference, here’s a sample crm_mon output:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">============<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-family:"Courier New"">Last updated: Tue Mar 5 06:10:22 2013<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">Stack: Heartbeat<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Current DC: mgraid-12241530rn01433-0 (f4e5e15c-d06b-4e37-89b9-4621af05128f) - partition with quorum<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">Version: 1.0.9-89bd754939df5150de7cd76835f98fe90851b677<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">2 Nodes configured, unknown expected votes<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">9 Resources configured.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">============<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal">
<span style="font-family:"Courier New"">Online: [ mgraid-12241530rn01433-0 mgraid-12241530rn01433-1 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Clone Set: Fencing<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Started: [ mgraid-12241530rn01433-0 mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Clone Set: cloneIcms<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Started: [ mgraid-12241530rn01433-0 mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Clone Set: cloneOmserver<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Started: [ mgraid-12241530rn01433-0 mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS11451532RN01389<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS11481532RN01465<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS12171532RN01613<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS12241530RN01433<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS12391532RN01768<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Master/Slave Set: ms-SS12391532RN01772<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> Masters: [ mgraid-12241530rn01433-0 ]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Courier New""> Slaves: [ mgraid-12241530rn01433-1 ]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">I’ve been investigating the system’s behavior when one or more master SS instances crashes, simulated by a </span><span style="font-family:"Courier New"">kill</span><span style="font-family:"Comic Sans MS""> command. I’ve noticed two behaviors of interest.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">First, in a simple case, where one master SS is </span><span style="font-family:"Courier New"">killed</span><span style="font-family:"Comic Sans MS"">, it takes about 10-12 seconds for the slave to complete the failover. From the log files, the DC issues the following notifications to the slave SS:<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Pre_notify_demote<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Post_notify_demote<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Pre_notify_stop<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Post_notify_stop<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Pre_notify_promote<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Promote<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Post_notify_promote<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Monitor_3000<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Pre_notify_start<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Post_notify_start<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">These notifications and their confirmations appear to take about 1-2 seconds each, begging the following questions:<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Is this sequence of notifications expected?</span></p>
</div></div></blockquote><div><br></div><div>Yes, it looks correct (if sub-optimal) to me.</div><div>A more recent version might provide a better experience.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-family:"Comic Sans MS""><u></u><u></u></span></p><p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Is the 10-12 second timeframe expected?</span></p>
</div></div></blockquote><div><br></div><div>Its really dependant on what the RA (resource agent) does with the notification (and therefor how long it takes).</div><div>Do you need the notifications turned on? Some agents like drbd do need it, but without knowing which agents you're using its hard to say.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-family:"Comic Sans MS""><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">Second, in a more complex case, where the master SS for each instance is assigned to the same can, and each SS is in turn </span><span style="font-family:"Courier New"">killed</span><span style="font-family:"Comic Sans MS""> with an approximate 10-second delay between </span><span style="font-family:"Courier New"">kill</span><span style="font-family:"Comic Sans MS""> commands, there appear to be very long delays in processing the notifications. These delays appear to be associated with these factors<u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">After an SS instance is </span><span style="font-family:"Courier New"">killed</span><span style="font-family:"Comic Sans MS"">, there’s a 10-second monitor notification which causes a new SS instance to be launched to replace the missing SS instance.</span></p>
</div></div></blockquote><div><br></div><div>Whoa... monitor restarts the service if it detects a failure?</div><div>That is rarely a good idea. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-family:"Comic Sans MS""><u></u><u></u></span></p><p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">It takes about 30 seconds for an SS instance to complete the startup process. The resource agent waits for that startup to complete before returning to </span><span style="font-family:"Courier New"">crmd</span><span style="font-family:"Comic Sans MS"">.</span></p>
</div></div></blockquote><div><br></div><div>Right, agents shouldn't say "done" until they really are.</div><div>Returning too soon usually just leads to people needing to insert delays/sleeps into anything that depends on it.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-family:"Comic Sans MS""><u></u><u></u></span></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Until the resource agent returns, </span><span style="font-family:"Courier New"">crmd</span><span style="font-family:"Comic Sans MS""> does not process notifications for any other SS/resource.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS"">The net effect of these delays varies from one SS instance to another. In some cases, the “normal” failover occurs, taking 10-12 seconds. In other cases, there is no failover to the other host’s SS instance, and there is no master/active SS instance for 1-2 <b>minutes </b>(until an SS instance is re-launched following the </span><span style="font-family:"Courier New"">kill</span><span style="font-family:"Comic Sans MS"">), depending upon the number of disk enclosures and thus the number of SS instances.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">My first question in this case is simply whether the serialization of notifications among the various SS resources is expected?</span></p>
</div></div></blockquote><div><br></div><div>They happen before+after each operation on the master/slave resource.</div><div>So first we tell all the instances of X that one or more instances are about to be $action'd then we perform $action, then we tell any active instances of X that we did it.</div>
<div>Then we move on to the next action (demote -> stop -> start -> promote)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">
<div><p class="MsoNormal"><span style="font-family:"Comic Sans MS""> In other words, transition notifications for one resource are delayed until earlier notifications are completed. Is this the expected behavior? </span></p>
</div></div></blockquote><div><br></div><div>Only if you created ordering constraints between the two master/slave resources.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-family:"Comic Sans MS""> Secondly, once the SS instance has been restarted,</span></p></div></div></blockquote><div><br></div>
<div>By who? The agent or pacemaker?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">
<span style="font-family:"Comic Sans MS"">there’s apparently no attempt to complete the failover; the new SS instance assumes the active/master role<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS"">Finally, a couple of general questions:<u></u><u></u></span></p><p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Is there any reason to believe that a later version of Pacemaker would behave differently?</span></p>
</div></div></blockquote><div><br></div><div>Quite likely.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple">
<div><p><span style="font-family:"Comic Sans MS""><b><u></u><u></u></b></span></p><p><u></u><span style="font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-family:"Comic Sans MS"">Is there a mechanism by which the </span><span style="font-family:"Courier New"">crmd</span><span style="font-family:"Comic Sans MS""> (and </span><span style="font-family:"Courier New"">lrmd</span><span style="font-family:"Comic Sans MS"">) debug levels can be increased at run time (allowing more debug messages in the log output)?</span></p>
</div></div></blockquote><div><br></div><div>IIRC, killall -USR1 crmd lrmd</div><div><br></div><div>In later versions we support killall -TRAP to dump the current buffer of trace logging to disk (we keep the last 5mb in memory in case an error occurs).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-family:"Comic Sans MS""><b><u></u><u></u></b></span></p>
<p class="MsoNormal"><b><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></b></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS"">Thanks very much for your help,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Comic Sans MS"">Michael Powell<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:"Comic Sans MS""><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"><img width="160" height="50" src="cid:image001.gif@01CE1966.78F62940" alt="LogoSignature2"><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> Michael Powell<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> Staff Engineer<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> 15220 NW Greenbrier Pkwy<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> Suite 290<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> Beaverton, OR 97006<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> T <a href="tel:503-372-7327" value="+15033727327" target="_blank">503-372-7327</a> M <a href="tel:503-789-3019" value="+15037893019" target="_blank">503-789-3019</a> H <a href="tel:503-625-5332" value="+15036255332" target="_blank">503-625-5332</a><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1f497d"> <a href="http://www.harmonicinc.com" target="_blank"><span style="color:blue">www.harmonicinc.com</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p></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://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br></blockquote></div><br>