Skip to contentSkip to conversation

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

PATCH In review Peter Maydell 2 participants 5 messages Aug 23, 2018 – Aug 24, 2018

lore
Share & tools
lore
#0 lore raw

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

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.

---
I see this ssh-connection-attempt timeout occasionally in my test builds...

 tests/vm/basevm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/vm/basevm.py +1 -1
index d7149dea7da..7e58d9e0ca2 100755
@@ -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:
Signature · 1 line
2.18.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Peter Maydell

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.

Again, please apply this yourself. :)

Thanks,

Fam

author Applied
#2 lore raw
Quoted 7 lines · Fam Zheng
Quoted 6 lines · Peter Maydell

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.

Quoted 5 lines
Quoted 1 line

Again, please apply this yourself. :)

Applied, thanks.

-- PMM

#3 lore raw
Quoted 8 lines · Peter Maydell
Quoted 7 lines · Fam Zheng
Quoted 6 lines · Peter Maydell

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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 [email protected] 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 [email protected] exit 0

(eg a capture of its terminal output) ?

thanks
-- PMM

#4 lore raw
Quoted 30 lines · Peter Maydell
Quoted 8 lines · Peter Maydell
Quoted 7 lines · Fam Zheng
Quoted 6 lines · Peter Maydell

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.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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 [email protected] 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 [email protected] exit 0

Quoted 1 line

(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