Increase timeout for snapshotting from 180 to 700 s
1. [compute/build_timeout] stanza in OSTF config file is used not for build VM only but for VM snapshot creation too. Nova-compute spend a significant time to download/upload big images to/from vCenter (5-10MB/s in our testbed). So it leads to a timeout error for 'boot_from_snapshot' operation with the 180s timeout. That's why the [compute/build_timeout] is increased to 500s. It shouldn't affect any other test because the 'status_timeout' method (from test.py) which uses this stanza always wrapped with 'verify' method (from test_mixins.py), and the 'verify' method is always called with more strict (and unique) timeout for every step in each test. 2. Timeouts for snapshot operations should be increased in case of vCenter as a hypervisor.for They are fixed from 180s to 700s. 3. Logging improvements in 'verify' method (from test_mixins.py). Change-Id: I35521f75dae4f9bef4e20fd8c1154f2e510ba921 Closes-bug: 1386547
This commit is contained in:
parent
c8b9f9aa12
commit
a9afb68710
|
@ -224,6 +224,10 @@ class timeout(object):
|
|||
if exc_type is not TimeOutError:
|
||||
return False # never swallow other exceptions
|
||||
else:
|
||||
LOG.info("Timeout {timeout}s exceeded for {call}".format(
|
||||
call=self.action,
|
||||
timeout=self.timeout
|
||||
))
|
||||
msg = ("Time limit exceeded while waiting for {call} to "
|
||||
"finish.").format(call=self.action)
|
||||
raise AssertionError(msg)
|
||||
|
|
|
@ -111,7 +111,7 @@ ComputeGroup = [
|
|||
default=10,
|
||||
help="Time in seconds between build status checks."),
|
||||
cfg.IntOpt('build_timeout',
|
||||
default=160,
|
||||
default=500,
|
||||
help="Timeout in seconds to wait for an instance to build."),
|
||||
cfg.BoolOpt('run_ssh',
|
||||
default=False,
|
||||
|
|
|
@ -146,6 +146,15 @@ class TestImageAction(nmanager.SmokeChecksTest):
|
|||
7. Delete server.
|
||||
Duration: 300 s.
|
||||
"""
|
||||
if self.config.compute.libvirt_type == 'vcenter':
|
||||
LOG.debug(
|
||||
"Redefining timeout for instance snapshot operations"
|
||||
" because of slow vCenter speed."
|
||||
)
|
||||
image_ops_timeout = 700
|
||||
else:
|
||||
image_ops_timeout = 180
|
||||
|
||||
image = self.verify(30, self.get_image_from_name, 1,
|
||||
"Image can not be retrieved.",
|
||||
"getting image by name")
|
||||
|
@ -156,7 +165,8 @@ class TestImageAction(nmanager.SmokeChecksTest):
|
|||
image)
|
||||
|
||||
# snapshot the instance
|
||||
snapshot_image_id = self.verify(180, self._create_image, 3,
|
||||
snapshot_image_id = self.verify(image_ops_timeout, self._create_image,
|
||||
3,
|
||||
"Snapshot of an"
|
||||
" instance can not be created.",
|
||||
'snapshotting an instance',
|
||||
|
@ -172,7 +182,7 @@ class TestImageAction(nmanager.SmokeChecksTest):
|
|||
'Wait for instance deletion complete',
|
||||
server)
|
||||
|
||||
server = self.verify(180, self._boot_image, 6,
|
||||
server = self.verify(image_ops_timeout, self._boot_image, 6,
|
||||
"Instance can not be launched from snapshot.",
|
||||
'booting instance from snapshot',
|
||||
snapshot_image_id)
|
||||
|
|
Loading…
Reference in New Issue