<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Shwetha Panduranga" &lt;spandura@redhat.com&gt;<br><b>To: </b>"Nigel Babu" &lt;nigelb@redhat.com&gt;<br><b>Cc: </b>"Gluster Devel" &lt;gluster-devel@gluster.org&gt;<br><b>Sent: </b>Wednesday, August 30, 2017 6:29:08 AM<br><b>Subject: </b>Re: [Gluster-devel] Release 3.12: Glusto run status<br><div><br></div><div dir="ltr">I submitted a patch making the changes: <a href="https://review.gluster.org/#/c/18152/2" target="_blank">https://review.gluster.org/#/c/18152/2</a><br></div></blockquote><div>We can easily replace the sleep with a timed wait_for_rebalance_to_start() loop function that watches for "in progress", log the status, followed by the existing <span><span>wait_for_rebalance_to_complete</span></span>().<br></div><div>It solves the problem and scales (at least up).<br></div><div><br></div><div>We can also refactor into a single wait_for_rebalance_status() method and call it twice with appropriate status(es) as args.</div><div>For backwards compatibility just treat wait_for_rebalance_to_complete() as a wrapper to the new function and doc/log as deprecated.<br></div><div><br></div><div>Cheers,<br></div><div>Jonathan<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 30, 2017 at 4:45 PM, Shwetha Panduranga <span dir="ltr">&lt;<a href="mailto:spandura@redhat.com" target="_blank">spandura@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">we had the first&nbsp; 'rebalance status" for logging purposes. wait_for_rebalance_to_complete will get the xml command output for validations.&nbsp; --xml ouputs go to debug log levels.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 30, 2017 at 4:35 PM, Nigel Babu <span dir="ltr">&lt;<a href="mailto:nigelb@redhat.com" target="_blank">nigelb@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Why are we failing because the first "rebalance status" fails? Isn't it supposed to check in a loop and wait until it succeeds?</div><div><br></div><div>Specifically, I think line 288 and 289 need to be removed <a href="http://git.gluster.org/cgit/glusto-tests.git/tree/glustolibs-gluster/glustolibs/gluster/rebalance_ops.py#n288" target="_blank">http://git.gluster.org/cgit/glusto-tests.git/tree/glustolibs-gluster/glustolibs/gluster/rebalance_ops.py#n288</a><br></div><div><br></div><div>Is that a fair assessment?<br></div><div><div><div class="gmail_extra"><span><br><div class="gmail_quote">On Wed, Aug 30, 2017 at 4:28 PM, Shwetha Panduranga <span dir="ltr">&lt;<a href="mailto:spandura@redhat.com" target="_blank">spandura@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">May be i should change the log message from 'Checking rebalance status' to 'Logging rebalance status' because the first 'rebalance status' command just does that . It executes 'rebalance status'. Now wait_for_rebalance_to_complete validates rebalance is 'completed' within 5 minutes ( default time out ). If that makes sense i will make those changes as well along with introducing the delay b/w 'start' and 'status'<br></div><div class="m_-7838102332915488173m_5133835730274328652gmail-HOEnZb"><div class="m_-7838102332915488173m_5133835730274328652gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 30, 2017 at 4:26 PM, Atin Mukherjee <span dir="ltr">&lt;<a href="mailto:amukherj@redhat.com" target="_blank">amukherj@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Aug 30, 2017 at 4:23 PM, Shwetha Panduranga <span dir="ltr">&lt;<a href="mailto:spandura@redhat.com" target="_blank">spandura@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">This is the first check where we just execute 'rebalance status' . That's the command which failed and hence failed the test case. If u see the test case, the next step is wait_for_rebalance_to_complete (status --xml). This is where we execute&nbsp; rebalance status until 5 minutes for rebalance to get completed. Even before waiting for rebalance, the first execution of status command failed. Hence the test case failed. <br></div></blockquote><div><br></div></span><div>Cool. So there is still a problem in the test case. We can't assume rebalance status to report back success immediately after rebalance start and I've explained the why part in the earlier thread. Why do we need to do an intermediate check of rebalance status before going for&nbsp;  wait_for_rebalance_to_complete ?</div><div><div class="m_-7838102332915488173m_5133835730274328652gmail-m_-5222011862098697951h5"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br clear="all"></blockquote></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></span><span class="m_-7838102332915488173HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888">-- <br><div class="m_-7838102332915488173m_5133835730274328652gmail_signature"><div dir="ltr">nigelb<br></div></div>
</span></span></div></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div><br>_______________________________________________<br>Gluster-devel mailing list<br>Gluster-devel@gluster.org<br>http://lists.gluster.org/mailman/listinfo/gluster-devel</blockquote><div><br></div></div></body></html>