<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Andrew,</div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Comments at end with &lt;BS&gt;</div><div><br><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Andrew Beekhof &lt;andrew@beekhof.net&gt;<br><b><span style="font-weight: bold;">To:</span></b> Bob Schatz &lt;bschatz@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> The Pacemaker cluster resource manager
 &lt;pacemaker@oss.clusterlabs.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Fri, April 15, 2011 4:28:52 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Pacemaker] Question regarding starting of master/slave resources and ELECTIONs<br></font><br>
On Fri, Apr 15, 2011 at 5:58 AM, Bob Schatz &lt;<a ymailto="mailto:bschatz@yahoo.com" href="mailto:bschatz@yahoo.com">bschatz@yahoo.com</a>&gt; wrote:<br>&gt; Andrew,<br>&gt; Thanks for the help<br>&gt; Comments inline with &lt;BS&gt;<br>&gt; ________________________________<br>&gt; From: Andrew Beekhof &lt;<a ymailto="mailto:andrew@beekhof.net" href="mailto:andrew@beekhof.net">andrew@beekhof.net</a>&gt;<br>&gt; To: Bob Schatz &lt;<a ymailto="mailto:bschatz@yahoo.com" href="mailto:bschatz@yahoo.com">bschatz@yahoo.com</a>&gt;<br>&gt; Cc: The Pacemaker cluster resource manager &lt;<a ymailto="mailto:pacemaker@oss.clusterlabs.org" href="mailto:pacemaker@oss.clusterlabs.org">pacemaker@oss.clusterlabs.org</a>&gt;<br>&gt; Sent: Thu, April 14, 2011 2:14:40 AM<br>&gt; Subject: Re: [Pacemaker] Question regarding starting of master/slave<br>&gt; resources and ELECTIONs<br>&gt;<br>&gt; On Thu, Apr 14, 2011 at 10:49 AM, Andrew Beekhof &lt;<a
 ymailto="mailto:andrew@beekhof.net" href="mailto:andrew@beekhof.net">andrew@beekhof.net</a>&gt; wrote:<br>&gt;<br>&gt;&gt;&gt;&gt; I noticed that 4 of the master/slave resources will start right away but<br>&gt;&gt;&gt;&gt; the<br>&gt;&gt;&gt;&gt; 5 master/slave resource seems to take a minute or so and I am only<br>&gt;&gt;&gt;&gt; running<br>&gt;&gt;&gt;&gt; with one node.<br>&gt;&gt;&gt;&gt; Is this expected?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Probably, if the other 4 take around a minute each to start.<br>&gt;&gt;&gt; There is an lrmd config variable that controls how much parallelism it<br>&gt;&gt;&gt; allows (but i forget the name).<br>&gt;&gt;&gt; &lt;Bob&gt; It's max-children and I set it to 40 for this test to see if it<br>&gt;&gt;&gt; would<br>&gt;&gt;&gt; change the behavior. &nbsp;(/sbin/lrmadmin -p max-children 40)<br>&gt;&gt;<br>&gt;&gt; Thats surprising. &nbsp;I'll have a look at the logs.<br>&gt;<br>&gt; Looking at the logs, I see a couple
 of things:<br>&gt;<br>&gt;<br>&gt; This is very bad:<br>&gt; Apr 12 19:33:42 mgraid-S000030311-1 crmd: [17529]: WARN: get_uuid:<br>&gt; Could not calculate UUID for mgraid-s000030311-0<br>&gt; Apr 12 19:33:42 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; populate_cib_nodes_ha: Node mgraid-s000030311-0: no uuid found<br>&gt;<br>&gt; For some reason pacemaker cant get the node's uuid from heartbeat.<br>&gt;<br>&gt; &lt;BS&gt; I create the uuid when the node comes up.<br><br>Heartbeat should have already created it before pacemaker even got<br>started though.<br><br>&gt;<br>&gt; So we start a few things:<br>&gt;<br>&gt; Apr 12 19:33:41 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; do_lrm_rsc_op: Performing<br>&gt; key=23:3:0:48aac631-8177-4cda-94ea-48dfa9b1a90f<br>&gt; op=SSS000030311:0_start_0 )<br>&gt; Apr 12 19:33:41 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; do_lrm_rsc_op: Performing<br>&gt;
 key=49:3:0:48aac631-8177-4cda-94ea-48dfa9b1a90f<br>&gt; op=SSJ000030312:0_start_0 )<br>&gt; Apr 12 19:33:41 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; do_lrm_rsc_op: Performing<br>&gt; key=75:3:0:48aac631-8177-4cda-94ea-48dfa9b1a90f<br>&gt; op=SSJ000030313:0_start_0 )<br>&gt; Apr 12 19:33:41 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; do_lrm_rsc_op: Performing<br>&gt; key=101:3:0:48aac631-8177-4cda-94ea-48dfa9b1a90f<br>&gt; op=SSJ000030314:0_start_0 )<br>&gt;<br>&gt; But then another change comes in:<br>&gt;<br>&gt; Apr 12 19:33:41 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; abort_transition_graph: need_abort:59 - Triggered transition abort<br>&gt; (complete=0) : Non-status change<br>&gt;<br>&gt; Normally we'd recompute and keep going, but it was a(nother) replace<br>&gt; operation, so:<br>&gt;<br>&gt; Apr 12 19:33:42 mgraid-S000030311-1 crmd: [17529]: info:<br>&gt; do_state_transition: State transition S_TRANSITION_ENGINE -&gt;<br>&gt;
 S_ELECTION [ input=I_ELECTION cause=C_FSA_INTERNAL<br>&gt; origin=do_cib_replaced ]<br>&gt;<br>&gt; All the time goes here:<br>&gt;<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Timer popped (timeout=20000,<br>&gt; abort_level=1000000, complete=true)<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Ignoring timeout while not in transition<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Timer popped (timeout=20000,<br>&gt; abort_level=1000000, complete=true)<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Ignoring timeout while not in transition<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Timer popped (timeout=20000,<br>&gt; abort_level=1000000, complete=true)<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd:
 [17529]: WARN:<br>&gt; action_timer_callback: Ignoring timeout while not in transition<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Timer popped (timeout=20000,<br>&gt; abort_level=1000000, complete=true)<br>&gt; Apr 12 19:35:31 mgraid-S000030311-1 crmd: [17529]: WARN:<br>&gt; action_timer_callback: Ignoring timeout while not in transition<br>&gt; Apr 12 19:37:00 mgraid-S000030311-1 crmd: [17529]: ERROR:<br>&gt; crm_timer_popped: Integration Timer (I_INTEGRATED) just popped!<br>&gt;<br>&gt; but its not at all clear to me why - although certainly avoiding the<br>&gt; election would help.<br>&gt; Is there any chance to load all the changes at once?<br>&gt;<br>&gt; &lt;BS&gt; Yes. &nbsp;That worked. &nbsp;I created the configuration in a file and then did<br>&gt; a "crm configure load update &lt;filename&gt;" to avoid the election<br>&gt; Possibly the delay related to the UUID issue above, possibly it
 might<br>&gt; be related to one of these two patches that went in after 1.0.9<br>&gt;<br>&gt; andrew (stable-1.0)&nbsp;&nbsp;&nbsp; High: crmd: Make sure we always poke the FSA after<br>&gt; a transition to clear any TE_HALT actions CS: 9187c0506fd3 On:<br>&gt; 2010-07-07<br>&gt; andrew (stable-1.0)&nbsp;&nbsp;&nbsp; High: crmd: Reschedule the PE_START action if its<br>&gt; not already running when we try to use it CS: e44dfe49e448 On:<br>&gt; 2010-11-11<br>&gt;<br>&gt; Could you try turning on debug and/or a more recent version?<br>&gt;<br>&gt; &lt;BS&gt; &nbsp;I turned on debug and grabbed the logs, configuration and and<br>&gt; /var/lib/pengine directory. &nbsp; They are attached.<br>&gt; &nbsp;&nbsp; &nbsp; Unfortunately I cannot try a new version with this hardware at this<br>&gt; time. :(<br><br>Based on the new logs, it looks like the problem is resolved by<br>loading everything once.<br>All start actions appear to occur within a second of Apr 14
 20:35:43.<br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; ">&lt;BS&gt; &nbsp;This run did not create the resources all at once. &nbsp;It did start the resources at Apr 14 20:35:43.</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; ">However, when looking at the log debug/ctlr0/ha-debug you will see these entries (Note this node is not the pengine):</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 lrmd: [15228]: debug: on_msg_get_state:state of rsc mgraid-stonith:0 is LRM_RSC_IDLE</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52
 mgraid-S000030311-0 lrmd: [15228]: debug: on_msg_get_state:state of rsc SSJ000030313:0 is LRM_RSC_BUSY</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 crmd: [15231]: WARN: msg_to_op(1324): failed to get the value of field lrm_opstatus from a ha_msg</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 crmd: [15231]: info: msg_to_op: Message follows:</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 crmd: [15231]: info: MSG: Dumping message with 16 fields</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 crmd: [15231]: info: MSG[0] : [lrm_t=op]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14
 20:35:52 mgraid-S000030311-0 crmd: [15231]: info: MSG[1] : [lrm_rid=SSJ000030313:0]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">Apr 14 20:35:52 mgraid-S000030311-0 crmd: [15231]: info: MSG[2] : [lrm_op=start]</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><br></div></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; ">This was reported as bug report 2580.</div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><br></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; ">Later, this resource was stopped for some reason by pengine.</div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><br></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; ">Unfortunately, I grabbed
 the logs before the resources such as&nbsp;<span class="Apple-style-span" style="font-size: small; ">SSJ000030313:0 were stopped. &nbsp;:( :(</span></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><span class="Apple-style-span" style="font-size: small; "><br></span></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><span class="Apple-style-span" style="font-size: small; ">Anyway, I was able to get things to work correctly as summarized below.</span></div><div style="color: black; font-family: arial, helvetica, sans-serif; font-size: 13px; "><span class="Apple-style-span" style="font-size: small; "><br></span></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">I think that 2580 covers all of the issues to get the problem fixed. &nbsp;Do you agree?</font></div><div style="color: black; font-family: arial,
 helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">In the mean time, a summary of the work around was that I did these steps:</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">1. Increase the number of threads lrmd has to fork off the shell scripts to do start, monitor, etc with this command in /etc/ha.d/resource.d/startstop (post-start action)</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">&nbsp;&nbsp; &nbsp; &nbsp;
 #&nbsp;&nbsp;/sbin/lrmadmin -p max-children 8</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">2. Create all of the resources needed in one file (basically take the output from a "crm configure show" on an already configured system and copy to a file) as opposed to creating each resource and associated linkage with individual crm commands. &nbsp;This avoids the "replace" step which may happen in crm. &nbsp;The "replace" operation causes the crmds to do an election which causes me problems. &nbsp;(I assume it is a bug related to 2580 but I am not sure)</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica,
 sans-serif; "><font class="Apple-style-span" size="2">3. Do an "update" as opposed to a "replace" of the HA configuration with this step:</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">&nbsp;&nbsp; &nbsp; &nbsp;#&nbsp;crm configure load update &lt;filename&gt;</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">Thanks Andrew for your help!</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font
 class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">Bob</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2">&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;</font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="color: black; font-family: arial, helvetica, sans-serif; "><font class="Apple-style-span" size="2"><br></font></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: black; "><br></div></div><div style="position: fixed; color: black; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "></div>


</div></body></html>