* [AUTOTEST] print login command and change some timeout values
@ 2009-07-24 11:28 sudhir kumar
2009-07-24 11:29 ` sudhir kumar
0 siblings, 1 reply; 7+ messages in thread
From: sudhir kumar @ 2009-07-24 11:28 UTC (permalink / raw)
To: Autotest mailing list
Cc: kvm-devel, Lucas Meneghel Rodrigues, Michael Goldish, smalikphy
This patch does two small things.
1. Prints the guest login command to debug messages.
2. Changes the guest login timeout to 240 seconds. I see the timeout for
*.wait_for() functions in boot test is 240 seconds, while in reboot is 120
seconds which causes the test to fail. We might have missed it by mistake.
240 seconds is a reasonable timeout duration. This patch fixes that.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Index: autotest/client/tests/kvm/kvm_utils.py
===================================================================
--- autotest.orig/client/tests/kvm/kvm_utils.py
+++ autotest/client/tests/kvm/kvm_utils.py
@@ -637,6 +637,7 @@ def remote_login(command, password, prom
password_prompt_count = 0
logging.debug("Trying to login...")
+ logging.debug("Guest login Command: %s" % command)
while True:
(match, text) = sub.read_until_last_line_matches(
Index: autotest/client/tests/kvm/kvm_tests.py
===================================================================
--- autotest.orig/client/tests/kvm/kvm_tests.py
+++ autotest/client/tests/kvm/kvm_tests.py
@@ -48,7 +48,7 @@ def run_boot(test, params, env):
logging.info("Guest is down; waiting for it to go up again...")
- session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
+ session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
if not session:
raise error.TestFail("Could not log into guest after reboot")
@@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
logging.info("Shutdown command sent; waiting for guest to go down...")
- if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
+ if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
raise error.TestFail("Guest refuses to go down")
logging.info("Guest is down")
@@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
logging.info("Logging into guest...")
- session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
+ session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
if not session:
message = "Could not log into guest"
logging.error(message)
--
Sudhir Kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [AUTOTEST] print login command and change some timeout values
2009-07-24 11:28 sudhir kumar
@ 2009-07-24 11:29 ` sudhir kumar
0 siblings, 0 replies; 7+ messages in thread
From: sudhir kumar @ 2009-07-24 11:29 UTC (permalink / raw)
To: Autotest mailing list
Cc: kvm-devel, Lucas Meneghel Rodrigues, Michael Goldish, smalikphy
[-- Attachment #1: Type: text/plain, Size: 2482 bytes --]
Ah!
As reported earlier the patch might be wrapped up. So sending as an
attachment too.
On Fri, Jul 24, 2009 at 4:58 PM, sudhir kumar<smalikphy@gmail.com> wrote:
> This patch does two small things.
> 1. Prints the guest login command to debug messages.
> 2. Changes the guest login timeout to 240 seconds. I see the timeout for
> *.wait_for() functions in boot test is 240 seconds, while in reboot is 120
> seconds which causes the test to fail. We might have missed it by mistake.
> 240 seconds is a reasonable timeout duration. This patch fixes that.
>
> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
>
> Index: autotest/client/tests/kvm/kvm_utils.py
> ===================================================================
> --- autotest.orig/client/tests/kvm/kvm_utils.py
> +++ autotest/client/tests/kvm/kvm_utils.py
> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
> password_prompt_count = 0
>
> logging.debug("Trying to login...")
> + logging.debug("Guest login Command: %s" % command)
>
> while True:
> (match, text) = sub.read_until_last_line_matches(
> Index: autotest/client/tests/kvm/kvm_tests.py
> ===================================================================
> --- autotest.orig/client/tests/kvm/kvm_tests.py
> +++ autotest/client/tests/kvm/kvm_tests.py
> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
>
> logging.info("Guest is down; waiting for it to go up again...")
>
> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> if not session:
> raise error.TestFail("Could not log into guest after reboot")
>
> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
>
> logging.info("Shutdown command sent; waiting for guest to go down...")
>
> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
> raise error.TestFail("Guest refuses to go down")
>
> logging.info("Guest is down")
> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
>
> logging.info("Logging into guest...")
>
> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> if not session:
> message = "Could not log into guest"
> logging.error(message)
>
>
>
> --
> Sudhir Kumar
>
--
Sudhir Kumar
[-- Attachment #2: print-login-command-and-change-timeouts.patch --]
[-- Type: text/x-diff, Size: 2126 bytes --]
This patch does two small things.
1. Prints the guest login command to debug messages.
2. Changes the guest login timeout to 240 seconds. I see the timeout for
*.wait_for() functions in boot test is 240 seconds, while in reboot is 120
seconds which causes the test to fail. We might have missed it by mistake.
240 seconds is a reasonable timeout duration. This patch fixes that.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Index: autotest/client/tests/kvm/kvm_utils.py
===================================================================
--- autotest.orig/client/tests/kvm/kvm_utils.py
+++ autotest/client/tests/kvm/kvm_utils.py
@@ -637,6 +637,7 @@ def remote_login(command, password, prom
password_prompt_count = 0
logging.debug("Trying to login...")
+ logging.debug("Guest login Command: %s" % command)
while True:
(match, text) = sub.read_until_last_line_matches(
Index: autotest/client/tests/kvm/kvm_tests.py
===================================================================
--- autotest.orig/client/tests/kvm/kvm_tests.py
+++ autotest/client/tests/kvm/kvm_tests.py
@@ -48,7 +48,7 @@ def run_boot(test, params, env):
logging.info("Guest is down; waiting for it to go up again...")
- session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
+ session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
if not session:
raise error.TestFail("Could not log into guest after reboot")
@@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
logging.info("Shutdown command sent; waiting for guest to go down...")
- if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
+ if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
raise error.TestFail("Guest refuses to go down")
logging.info("Guest is down")
@@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
logging.info("Logging into guest...")
- session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
+ session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
if not session:
message = "Could not log into guest"
logging.error(message)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [AUTOTEST] print login command and change some timeout values
[not found] <181931540.953991248437806958.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
@ 2009-07-24 12:24 ` Michael Goldish
2009-07-24 15:00 ` sudhir kumar
0 siblings, 1 reply; 7+ messages in thread
From: Michael Goldish @ 2009-07-24 12:24 UTC (permalink / raw)
To: sudhir kumar; +Cc: kvm-devel, Lucas Meneghel Rodrigues, Autotest mailing list
----- "sudhir kumar" <smalikphy@gmail.com> wrote:
> This patch does two small things.
> 1. Prints the guest login command to debug messages.
Why do we want to do that?
> 2. Changes the guest login timeout to 240 seconds. I see the timeout
> for
> *.wait_for() functions in boot test is 240 seconds, while in reboot is
> 120
> seconds which causes the test to fail. We might have missed it by
> mistake.
> 240 seconds is a reasonable timeout duration. This patch fixes that.
Using the same timeout value everywhere makes sense, but it surprises me
that tests are failing because 120 isn't enough. It sounds like the host
has to be heavily loaded for the boot to take longer than 2 minutes. But
if it happened to you then let's increase the timeout.
> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
>
> Index: autotest/client/tests/kvm/kvm_utils.py
> ===================================================================
> --- autotest.orig/client/tests/kvm/kvm_utils.py
> +++ autotest/client/tests/kvm/kvm_utils.py
> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
> password_prompt_count = 0
>
> logging.debug("Trying to login...")
> + logging.debug("Guest login Command: %s" % command)
>
> while True:
> (match, text) = sub.read_until_last_line_matches(
> Index: autotest/client/tests/kvm/kvm_tests.py
> ===================================================================
> --- autotest.orig/client/tests/kvm/kvm_tests.py
> +++ autotest/client/tests/kvm/kvm_tests.py
> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
>
> logging.info("Guest is down; waiting for it to go up
> again...")
>
> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> if not session:
> raise error.TestFail("Could not log into guest after
> reboot")
>
> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
>
> logging.info("Shutdown command sent; waiting for guest to go
> down...")
>
> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
> raise error.TestFail("Guest refuses to go down")
>
> logging.info("Guest is down")
> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
>
> logging.info("Logging into guest...")
>
> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> if not session:
> message = "Could not log into guest"
> logging.error(message)
>
>
>
> --
> Sudhir Kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [AUTOTEST] print login command and change some timeout values
2009-07-24 12:24 ` Michael Goldish
@ 2009-07-24 15:00 ` sudhir kumar
0 siblings, 0 replies; 7+ messages in thread
From: sudhir kumar @ 2009-07-24 15:00 UTC (permalink / raw)
To: Michael Goldish
Cc: kvm-devel, Lucas Meneghel Rodrigues, Autotest mailing list
On Fri, Jul 24, 2009 at 5:54 PM, Michael Goldish<mgoldish@redhat.com> wrote:
>
> ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
>
>> This patch does two small things.
>> 1. Prints the guest login command to debug messages.
>
> Why do we want to do that?
I do not see any harm in that. We are logging "trying to login". If
sometimes login fail we can check by manually typing the same command
and see what went wrong. That print statement has helped me in past
quite a number of times.
>
>> 2. Changes the guest login timeout to 240 seconds. I see the timeout
>> for
>> *.wait_for() functions in boot test is 240 seconds, while in reboot is
>> 120
>> seconds which causes the test to fail. We might have missed it by
>> mistake.
>> 240 seconds is a reasonable timeout duration. This patch fixes that.
>
> Using the same timeout value everywhere makes sense, but it surprises me
> that tests are failing because 120 isn't enough. It sounds like the host
> has to be heavily loaded for the boot to take longer than 2 minutes. But
> if it happened to you then let's increase the timeout.
Yes please,
the test failed very near to the sshd daemon was about to run. So that
shows 120 seconds is not sufficient. The host was not at all loaded
and is a pretty high end machine.
Thanks.
>> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
>>
>> Index: autotest/client/tests/kvm/kvm_utils.py
>> ===================================================================
>> --- autotest.orig/client/tests/kvm/kvm_utils.py
>> +++ autotest/client/tests/kvm/kvm_utils.py
>> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
>> password_prompt_count = 0
>>
>> logging.debug("Trying to login...")
>> + logging.debug("Guest login Command: %s" % command)
>>
>> while True:
>> (match, text) = sub.read_until_last_line_matches(
>> Index: autotest/client/tests/kvm/kvm_tests.py
>> ===================================================================
>> --- autotest.orig/client/tests/kvm/kvm_tests.py
>> +++ autotest/client/tests/kvm/kvm_tests.py
>> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
>>
>> logging.info("Guest is down; waiting for it to go up
>> again...")
>>
>> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
>> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
>> if not session:
>> raise error.TestFail("Could not log into guest after
>> reboot")
>>
>> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
>>
>> logging.info("Shutdown command sent; waiting for guest to go
>> down...")
>>
>> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
>> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
>> raise error.TestFail("Guest refuses to go down")
>>
>> logging.info("Guest is down")
>> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
>>
>> logging.info("Logging into guest...")
>>
>> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
>> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
>> if not session:
>> message = "Could not log into guest"
>> logging.error(message)
>>
>>
>>
>> --
>> Sudhir Kumar
>
--
Sudhir Kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [AUTOTEST] print login command and change some timeout values
[not found] <1629700637.973841248451192277.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
@ 2009-07-24 16:03 ` Michael Goldish
2009-07-24 17:48 ` Lucas Meneghel Rodrigues
0 siblings, 1 reply; 7+ messages in thread
From: Michael Goldish @ 2009-07-24 16:03 UTC (permalink / raw)
To: sudhir kumar; +Cc: kvm-devel, Lucas Meneghel Rodrigues, Autotest mailing list
----- "sudhir kumar" <smalikphy@gmail.com> wrote:
> On Fri, Jul 24, 2009 at 5:54 PM, Michael Goldish<mgoldish@redhat.com>
> wrote:
> >
> > ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
> >
> >> This patch does two small things.
> >> 1. Prints the guest login command to debug messages.
> >
> > Why do we want to do that?
> I do not see any harm in that. We are logging "trying to login". If
> sometimes login fail we can check by manually typing the same command
> and see what went wrong. That print statement has helped me in past
> quite a number of times.
OK, no problem. What do you think about printing the login command and
the "trying to login" message on the same line, like:
Trying to login: ssh root@localhost 5000
or
Trying to login with command: ssh root@localhost 5000
or
Trying to login (ssh root@localhost 5000)
or something like that.
If you don't like any of these options, the patch is OK as it is.
I just thought it would be a good idea to keep the output short,
because "Trying to login" is displayed repeatedly during boot so
it can produce a lot of (not so interesting) output.
> >> 2. Changes the guest login timeout to 240 seconds. I see the
> timeout
> >> for
> >> *.wait_for() functions in boot test is 240 seconds, while in reboot
> is
> >> 120
> >> seconds which causes the test to fail. We might have missed it by
> >> mistake.
> >> 240 seconds is a reasonable timeout duration. This patch fixes
> that.
> >
> > Using the same timeout value everywhere makes sense, but it
> surprises me
> > that tests are failing because 120 isn't enough. It sounds like the
> host
> > has to be heavily loaded for the boot to take longer than 2 minutes.
> But
> > if it happened to you then let's increase the timeout.
>
> Yes please,
> the test failed very near to the sshd daemon was about to run. So
> that
> shows 120 seconds is not sufficient. The host was not at all loaded
> and is a pretty high end machine.
> Thanks.
OK, I agree. I guess I run fast guests most of the time, and some guests
can take much longer to boot.
> >> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
> >>
> >> Index: autotest/client/tests/kvm/kvm_utils.py
> >>
> ===================================================================
> >> --- autotest.orig/client/tests/kvm/kvm_utils.py
> >> +++ autotest/client/tests/kvm/kvm_utils.py
> >> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
> >> password_prompt_count = 0
> >>
> >> logging.debug("Trying to login...")
> >> + logging.debug("Guest login Command: %s" % command)
> >>
> >> while True:
> >> (match, text) = sub.read_until_last_line_matches(
> >> Index: autotest/client/tests/kvm/kvm_tests.py
> >>
> ===================================================================
> >> --- autotest.orig/client/tests/kvm/kvm_tests.py
> >> +++ autotest/client/tests/kvm/kvm_tests.py
> >> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
> >>
> >> logging.info("Guest is down; waiting for it to go up
> >> again...")
> >>
> >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> >> if not session:
> >> raise error.TestFail("Could not log into guest after
> >> reboot")
> >>
> >> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
> >>
> >> logging.info("Shutdown command sent; waiting for guest to go
> >> down...")
> >>
> >> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
> >> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
> >> raise error.TestFail("Guest refuses to go down")
> >>
> >> logging.info("Guest is down")
> >> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
> >>
> >> logging.info("Logging into guest...")
> >>
> >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> >> if not session:
> >> message = "Could not log into guest"
> >> logging.error(message)
> >>
> >>
> >>
> >> --
> >> Sudhir Kumar
> >
>
>
>
> --
> Sudhir Kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [AUTOTEST] print login command and change some timeout values
2009-07-24 16:03 ` [AUTOTEST] print login command and change some timeout values Michael Goldish
@ 2009-07-24 17:48 ` Lucas Meneghel Rodrigues
2009-07-28 2:53 ` [Autotest] " Lucas Meneghel Rodrigues
0 siblings, 1 reply; 7+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-24 17:48 UTC (permalink / raw)
To: Michael Goldish
Cc: sudhir kumar, kvm-devel, Lucas Meneghel Rodrigues,
Autotest mailing list
On Fri, 2009-07-24 at 12:03 -0400, Michael Goldish wrote:
> ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
>
> > On Fri, Jul 24, 2009 at 5:54 PM, Michael Goldish<mgoldish@redhat.com>
> > wrote:
> > >
> > > ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
> > >
> > >> This patch does two small things.
> > >> 1. Prints the guest login command to debug messages.
> > >
> > > Why do we want to do that?
> > I do not see any harm in that. We are logging "trying to login". If
> > sometimes login fail we can check by manually typing the same command
> > and see what went wrong. That print statement has helped me in past
> > quite a number of times.
>
> OK, no problem. What do you think about printing the login command and
> the "trying to login" message on the same line, like:
> Trying to login: ssh root@localhost 5000
> or
> Trying to login with command: ssh root@localhost 5000
> or
> Trying to login (ssh root@localhost 5000)
> or something like that.
I like the idea. Combining the two strings will save up some space and
help to debug things.
If noone objects, I am going to commit a slightly modified version of
Sudhir's patch with your suggestion, Michael.
> If you don't like any of these options, the patch is OK as it is.
> I just thought it would be a good idea to keep the output short,
> because "Trying to login" is displayed repeatedly during boot so
> it can produce a lot of (not so interesting) output.
>
> > >> 2. Changes the guest login timeout to 240 seconds. I see the
> > timeout
> > >> for
> > >> *.wait_for() functions in boot test is 240 seconds, while in reboot
> > is
> > >> 120
> > >> seconds which causes the test to fail. We might have missed it by
> > >> mistake.
> > >> 240 seconds is a reasonable timeout duration. This patch fixes
> > that.
> > >
> > > Using the same timeout value everywhere makes sense, but it
> > surprises me
> > > that tests are failing because 120 isn't enough. It sounds like the
> > host
> > > has to be heavily loaded for the boot to take longer than 2 minutes.
> > But
> > > if it happened to you then let's increase the timeout.
> >
> > Yes please,
> > the test failed very near to the sshd daemon was about to run. So
> > that
> > shows 120 seconds is not sufficient. The host was not at all loaded
> > and is a pretty high end machine.
> > Thanks.
>
> OK, I agree. I guess I run fast guests most of the time, and some guests
> can take much longer to boot.
>
> > >> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
> > >>
> > >> Index: autotest/client/tests/kvm/kvm_utils.py
> > >>
> > ===================================================================
> > >> --- autotest.orig/client/tests/kvm/kvm_utils.py
> > >> +++ autotest/client/tests/kvm/kvm_utils.py
> > >> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
> > >> password_prompt_count = 0
> > >>
> > >> logging.debug("Trying to login...")
> > >> + logging.debug("Guest login Command: %s" % command)
> > >>
> > >> while True:
> > >> (match, text) = sub.read_until_last_line_matches(
> > >> Index: autotest/client/tests/kvm/kvm_tests.py
> > >>
> > ===================================================================
> > >> --- autotest.orig/client/tests/kvm/kvm_tests.py
> > >> +++ autotest/client/tests/kvm/kvm_tests.py
> > >> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
> > >>
> > >> logging.info("Guest is down; waiting for it to go up
> > >> again...")
> > >>
> > >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> > >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> > >> if not session:
> > >> raise error.TestFail("Could not log into guest after
> > >> reboot")
> > >>
> > >> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
> > >>
> > >> logging.info("Shutdown command sent; waiting for guest to go
> > >> down...")
> > >>
> > >> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
> > >> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
> > >> raise error.TestFail("Guest refuses to go down")
> > >>
> > >> logging.info("Guest is down")
> > >> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
> > >>
> > >> logging.info("Logging into guest...")
> > >>
> > >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
> > >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
> > >> if not session:
> > >> message = "Could not log into guest"
> > >> logging.error(message)
> > >>
> > >>
> > >>
> > >> --
> > >> Sudhir Kumar
> > >
> >
> >
> >
> > --
> > Sudhir Kumar
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Autotest] [AUTOTEST] print login command and change some timeout values
2009-07-24 17:48 ` Lucas Meneghel Rodrigues
@ 2009-07-28 2:53 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 7+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-28 2:53 UTC (permalink / raw)
To: Michael Goldish
Cc: Autotest mailing list, Lucas Meneghel Rodrigues, kvm-devel
Ok, applied with minimal changes. See:
http://autotest.kernel.org/changeset/3448
On Fri, Jul 24, 2009 at 2:48 PM, Lucas Meneghel Rodrigues<lmr@redhat.com> wrote:
> On Fri, 2009-07-24 at 12:03 -0400, Michael Goldish wrote:
>> ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
>>
>> > On Fri, Jul 24, 2009 at 5:54 PM, Michael Goldish<mgoldish@redhat.com>
>> > wrote:
>> > >
>> > > ----- "sudhir kumar" <smalikphy@gmail.com> wrote:
>> > >
>> > >> This patch does two small things.
>> > >> 1. Prints the guest login command to debug messages.
>> > >
>> > > Why do we want to do that?
>> > I do not see any harm in that. We are logging "trying to login". If
>> > sometimes login fail we can check by manually typing the same command
>> > and see what went wrong. That print statement has helped me in past
>> > quite a number of times.
>>
>> OK, no problem. What do you think about printing the login command and
>> the "trying to login" message on the same line, like:
>> Trying to login: ssh root@localhost 5000
>> or
>> Trying to login with command: ssh root@localhost 5000
>> or
>> Trying to login (ssh root@localhost 5000)
>> or something like that.
>
> I like the idea. Combining the two strings will save up some space and
> help to debug things.
>
> If noone objects, I am going to commit a slightly modified version of
> Sudhir's patch with your suggestion, Michael.
>
>> If you don't like any of these options, the patch is OK as it is.
>> I just thought it would be a good idea to keep the output short,
>> because "Trying to login" is displayed repeatedly during boot so
>> it can produce a lot of (not so interesting) output.
>>
>> > >> 2. Changes the guest login timeout to 240 seconds. I see the
>> > timeout
>> > >> for
>> > >> *.wait_for() functions in boot test is 240 seconds, while in reboot
>> > is
>> > >> 120
>> > >> seconds which causes the test to fail. We might have missed it by
>> > >> mistake.
>> > >> 240 seconds is a reasonable timeout duration. This patch fixes
>> > that.
>> > >
>> > > Using the same timeout value everywhere makes sense, but it
>> > surprises me
>> > > that tests are failing because 120 isn't enough. It sounds like the
>> > host
>> > > has to be heavily loaded for the boot to take longer than 2 minutes.
>> > But
>> > > if it happened to you then let's increase the timeout.
>> >
>> > Yes please,
>> > the test failed very near to the sshd daemon was about to run. So
>> > that
>> > shows 120 seconds is not sufficient. The host was not at all loaded
>> > and is a pretty high end machine.
>> > Thanks.
>>
>> OK, I agree. I guess I run fast guests most of the time, and some guests
>> can take much longer to boot.
>>
>> > >> Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
>> > >>
>> > >> Index: autotest/client/tests/kvm/kvm_utils.py
>> > >>
>> > ===================================================================
>> > >> --- autotest.orig/client/tests/kvm/kvm_utils.py
>> > >> +++ autotest/client/tests/kvm/kvm_utils.py
>> > >> @@ -637,6 +637,7 @@ def remote_login(command, password, prom
>> > >> password_prompt_count = 0
>> > >>
>> > >> logging.debug("Trying to login...")
>> > >> + logging.debug("Guest login Command: %s" % command)
>> > >>
>> > >> while True:
>> > >> (match, text) = sub.read_until_last_line_matches(
>> > >> Index: autotest/client/tests/kvm/kvm_tests.py
>> > >>
>> > ===================================================================
>> > >> --- autotest.orig/client/tests/kvm/kvm_tests.py
>> > >> +++ autotest/client/tests/kvm/kvm_tests.py
>> > >> @@ -48,7 +48,7 @@ def run_boot(test, params, env):
>> > >>
>> > >> logging.info("Guest is down; waiting for it to go up
>> > >> again...")
>> > >>
>> > >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
>> > >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
>> > >> if not session:
>> > >> raise error.TestFail("Could not log into guest after
>> > >> reboot")
>> > >>
>> > >> @@ -88,7 +88,7 @@ def run_shutdown(test, params, env):
>> > >>
>> > >> logging.info("Shutdown command sent; waiting for guest to go
>> > >> down...")
>> > >>
>> > >> - if not kvm_utils.wait_for(vm.is_dead, 120, 0, 1):
>> > >> + if not kvm_utils.wait_for(vm.is_dead, 240, 0, 1):
>> > >> raise error.TestFail("Guest refuses to go down")
>> > >>
>> > >> logging.info("Guest is down")
>> > >> @@ -445,7 +445,7 @@ def run_yum_update(test, params, env):
>> > >>
>> > >> logging.info("Logging into guest...")
>> > >>
>> > >> - session = kvm_utils.wait_for(vm.ssh_login, 120, 0, 2)
>> > >> + session = kvm_utils.wait_for(vm.ssh_login, 240, 0, 2)
>> > >> if not session:
>> > >> message = "Could not log into guest"
>> > >> logging.error(message)
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> Sudhir Kumar
>> > >
>> >
>> >
>> >
>> > --
>> > Sudhir Kumar
>
> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>
--
Lucas Meneghel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-28 2:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1629700637.973841248451192277.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-07-24 16:03 ` [AUTOTEST] print login command and change some timeout values Michael Goldish
2009-07-24 17:48 ` Lucas Meneghel Rodrigues
2009-07-28 2:53 ` [Autotest] " Lucas Meneghel Rodrigues
[not found] <181931540.953991248437806958.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-07-24 12:24 ` Michael Goldish
2009-07-24 15:00 ` sudhir kumar
2009-07-24 11:28 sudhir kumar
2009-07-24 11:29 ` sudhir kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox