From: Lucas Meneghel Rodrigues Subject: Re: [Autotest] [PATCH] Increase waiting time before first session check in kvm_test_utils.reboot Date: Wed, 2 Dec 2009 11:21:28 -0200 Message-ID: <6ac58f4f0912020521x3e5ff51dl260fc76adb90f9cf@mail.gmail.com> References: <1636501188.707901259219080948.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> <1215872155.707961259219303870.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> <20091126075744.GA3196@rht.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Michael Goldish , autotest@test.kernel.org, kvm@vger.kernel.org To: "Cao, Chen" Return-path: Received: from mail-pw0-f42.google.com ([209.85.160.42]:45401 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753380AbZLBNVW convert rfc822-to-8bit (ORCPT ); Wed, 2 Dec 2009 08:21:22 -0500 Received: by pwi3 with SMTP id 3so108111pwi.21 for ; Wed, 02 Dec 2009 05:21:29 -0800 (PST) In-Reply-To: <20091126075744.GA3196@rht.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Ok, as discussed on this thread, following Michael's suggestion, I increased the time needed to rule a session as unresponsive from the default 5 seconds to 30 seconds. http://autotest.kernel.org/changeset/3987 This ought to be enough, if it isn't, let me know Chen! On Thu, Nov 26, 2009 at 5:57 AM, Cao, Chen wrote: > On Thu, Nov 26, 2009 at 02:08:23AM -0500, Michael Goldish wrote: >> >> ----- "Chen Cao" wrote: >> >> > Increase the sleeping time before the first check to 10 seconds, >> > and try every 2 seconds. >> > >> > But increasing these values cannot really solve the following >> > problem: >> > =A0 =A0 Guest is too heavy loaded, and have no time to response th= e >> > =A0 =A0 rebooting (method=3Dshell) request, so session.is_responsi= ve >> > returns >> > =A0 =A0 False, and we pass the first 'kvm_utils.wait_for'; >> > =A0 =A0 =A0 a WHILE later the load becomes lighter, and sshd (or r= ss) >> > becomes >> > =A0 =A0 responsive, whether or not is guest rebooting, here we are= trying >> > =A0 =A0 to establish a session to the guest at this point, unfortu= nately, >> > =A0 =A0 we succeed and pass the second 'wait_for', before rebootin= g kills >> > =A0 =A0 sshd (or rss). >> > >> > Signed-off-by: Cao, Chen >> > --- >> > =A0client/tests/kvm/kvm_test_utils.py | =A0 =A02 +- >> > =A01 files changed, 1 insertions(+), 1 deletions(-) >> > >> > diff --git a/client/tests/kvm/kvm_test_utils.py >> > b/client/tests/kvm/kvm_test_utils.py >> > index bf8aed2..e183dc6 100644 >> > --- a/client/tests/kvm/kvm_test_utils.py >> > +++ b/client/tests/kvm/kvm_test_utils.py >> > @@ -91,7 +91,7 @@ def reboot(vm, session, method=3D"shell", >> > sleep_before_reset=3D10, nic_index=3D0, >> > =A0 =A0 =A0 =A0 =A0logging.error("Unknown reboot method: %s" % met= hod) >> > >> > =A0 =A0 =A0# Wait for the session to become unresponsive and close= it >> > - =A0 =A0if not kvm_utils.wait_for(lambda: not session.is_responsi= ve(), >> > 120, 0, 1): >> > + =A0 =A0if not kvm_utils.wait_for(lambda: not session.is_responsi= ve(), >> > 120, 10, 2): >> >> By default, is_responsive() waits 5 secs before deciding the session >> is unresponsive. =A0You can change that line to: >> >> if not kvm_utils.wait_for(lambda: not session.is_responsive(timeout=3D= 20), >> >> to give the session 20 secs to respond before it's deemed unresponsi= ve. >> You can also make it 30. =A0Will that be long enough? >> > > I think this helps, thanks. > >> BTW, I'm just curious -- what load is running on the guest? > > e.g. > adding benchmarks of network/floating point/others as background > workload while doing live migrations. > > use autoit to launch testing tools in Windows guests. > >> Why would you want to reboot while the guest is loaded? >> > > to check if blue-screen happens when rebooting after the tests in > (Windows) guest, for example. > >> > =A0 =A0 =A0 =A0 =A0raise error.TestFail("Guest refuses to go down"= ) >> > =A0 =A0 =A0session.close() >> > >> > -- >> > 1.5.5.6 >> > >> > -- >> > To unsubscribe from this list: send the line "unsubscribe kvm" in >> > the body of a message to majordomo@vger.kernel.org >> > More majordomo info at =A0http://vger.kernel.org/majordomo-info.ht= ml > > -- > Cao, Chen > > GnuPG Key-ID:AC54E05E > keyserver hkp://keys.gnupg.net > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest > --=20 Lucas