Commit bd3103bc authored by Nikos Skalkotos's avatar Nikos Skalkotos

windows: Increase the connection check interval

Start by waiting for 5sec before retrying and double the interval
after each retry.
parent 6075f2dd
...@@ -701,7 +701,7 @@ class Windows(OSBase): ...@@ -701,7 +701,7 @@ class Windows(OSBase):
"""Check if winexe works on the Windows VM""" """Check if winexe works on the Windows VM"""
retries = self.sysprep_params['connection_retries'].value retries = self.sysprep_params['connection_retries'].value
timeout = [2] timeout = [5]
for i in xrange(1, retries - 1): for i in xrange(1, retries - 1):
timeout.insert(0, timeout[0] * 2) timeout.insert(0, timeout[0] * 2)
...@@ -724,8 +724,9 @@ class Windows(OSBase): ...@@ -724,8 +724,9 @@ class Windows(OSBase):
log.close() log.close()
self.out.output("failed! See: `%s' for the full output" % log.name) self.out.output("failed! See: `%s' for the full output" % log.name)
if i < retries - 1: if i < retries - 1:
self.out.output("retrying ...", False) wait = timeout.pop()
time.sleep(timeout.pop()) self.out.output("retrying in %d seconds ..." % wait, False)
time.sleep(wait)
raise FatalError("Connection to the Windows VM failed after %d retries" raise FatalError("Connection to the Windows VM failed after %d retries"
% retries) % retries)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment