diff mbox series

tests/vm: Increase timeout waiting for VM to boot to 5 minutes

Message ID 20180823112153.15279-1-peter.maydell@linaro.org
State New
Headers show
Series tests/vm: Increase timeout waiting for VM to boot to 5 minutes | expand

Commit Message

Peter Maydell Aug. 23, 2018, 11:21 a.m. UTC
The VM tests currently have a timeout of 2 minutes for trying
to connect to ssh. Since the guest VM has to boot from cold
to the point of accepting inbound ssh during this time, if the
host machine is heavily loaded it can spuriously time out.
Increase the timeout from 2 to 5 minutes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I see this ssh-connection-attempt timeout occasionally
in my test builds...

 tests/vm/basevm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Fam Zheng Aug. 23, 2018, 2:11 p.m. UTC | #1
On Thu, 08/23 12:21, Peter Maydell wrote:
> The VM tests currently have a timeout of 2 minutes for trying
> to connect to ssh. Since the guest VM has to boot from cold
> to the point of accepting inbound ssh during this time, if the
> host machine is heavily loaded it can spuriously time out.
> Increase the timeout from 2 to 5 minutes.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Acked-by: Fam Zheng <famz@redhat.com>

Again, please apply this yourself. :)

Thanks,

Fam
Peter Maydell Aug. 24, 2018, 12:02 p.m. UTC | #2
On 23 August 2018 at 15:11, Fam Zheng <famz@redhat.com> wrote:
> On Thu, 08/23 12:21, Peter Maydell wrote:
>> The VM tests currently have a timeout of 2 minutes for trying
>> to connect to ssh. Since the guest VM has to boot from cold
>> to the point of accepting inbound ssh during this time, if the
>> host machine is heavily loaded it can spuriously time out.
>> Increase the timeout from 2 to 5 minutes.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> Acked-by: Fam Zheng <famz@redhat.com>
>
> Again, please apply this yourself. :)

Applied, thanks.

-- PMM
Peter Maydell Aug. 24, 2018, 12:45 p.m. UTC | #3
On 24 August 2018 at 13:02, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 23 August 2018 at 15:11, Fam Zheng <famz@redhat.com> wrote:
>> On Thu, 08/23 12:21, Peter Maydell wrote:
>>> The VM tests currently have a timeout of 2 minutes for trying
>>> to connect to ssh. Since the guest VM has to boot from cold
>>> to the point of accepting inbound ssh during this time, if the
>>> host machine is heavily loaded it can spuriously time out.
>>> Increase the timeout from 2 to 5 minutes.
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>
>> Acked-by: Fam Zheng <famz@redhat.com>
>>
>> Again, please apply this yourself. :)
>
> Applied, thanks.

I'm still seeing the ssh login for a netbsd VM sometimes
sit there apparently indefinitely. Is there some way to
debug what the guest VM is actually doing when the
log just sits there doing
DEBUG:root:ssh_cmd: ssh -q -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 36947 -i
/home/peter.maydell/qemu-netbsd/build/vm-test-g0SkVX.tmp/id_rsa
qemu@127.0.0.1 exit 0
DEBUG:root:ssh_cmd: ssh -q -o StrictHostKeyChecking=no -o
UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 36947 -i
/home/peter.maydell/qemu-netbsd/build/vm-test-g0SkVX.tmp/id_rsa
qemu@127.0.0.1 exit 0

(eg a capture of its terminal output) ?

thanks
-- PMM
Fam Zheng Aug. 24, 2018, 1:51 p.m. UTC | #4
On Fri, 08/24 13:45, Peter Maydell wrote:
> On 24 August 2018 at 13:02, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 23 August 2018 at 15:11, Fam Zheng <famz@redhat.com> wrote:
> >> On Thu, 08/23 12:21, Peter Maydell wrote:
> >>> The VM tests currently have a timeout of 2 minutes for trying
> >>> to connect to ssh. Since the guest VM has to boot from cold
> >>> to the point of accepting inbound ssh during this time, if the
> >>> host machine is heavily loaded it can spuriously time out.
> >>> Increase the timeout from 2 to 5 minutes.
> >>>
> >>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> >>
> >> Acked-by: Fam Zheng <famz@redhat.com>
> >>
> >> Again, please apply this yourself. :)
> >
> > Applied, thanks.
> 
> I'm still seeing the ssh login for a netbsd VM sometimes
> sit there apparently indefinitely. Is there some way to
> debug what the guest VM is actually doing when the
> log just sits there doing
> DEBUG:root:ssh_cmd: ssh -q -o StrictHostKeyChecking=no -o
> UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 36947 -i
> /home/peter.maydell/qemu-netbsd/build/vm-test-g0SkVX.tmp/id_rsa
> qemu@127.0.0.1 exit 0
> DEBUG:root:ssh_cmd: ssh -q -o StrictHostKeyChecking=no -o
> UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 36947 -i
> /home/peter.maydell/qemu-netbsd/build/vm-test-g0SkVX.tmp/id_rsa
> qemu@127.0.0.1 exit 0
> 
> (eg a capture of its terminal output) ?

I need to investigate into it. Sometimes I see the timeout too with V=1, but not
if I omit it (i.e. on DEBUG: lines are echoed).

Fam
diff mbox series

Patch

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index d7149dea7da..7e58d9e0ca2 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -176,7 +176,7 @@  class BaseVM(object):
             raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \
                             usernet_info)
 
-    def wait_ssh(self, seconds=120):
+    def wait_ssh(self, seconds=300):
         starttime = datetime.datetime.now()
         guest_up = False
         while (datetime.datetime.now() - starttime).total_seconds() < seconds: