Unhardcode cloudinit wait timeout
Bump it to 90 sec to work on slover environments
Related-Prod: PRODX-48888
Change-Id: I91e9a50c2f51ba40260e8347e38d7aa477a2cd59
(cherry picked from commit 3b52a6012adff0eadb77f420316f7a43b4aabe70)
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index a13aff4..3e9fef2 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -713,8 +713,9 @@
raise lib_exc.TimeoutException()
-def wait_for_cloudinit(ssh_client, timeout=60):
+def wait_for_cloudinit(ssh_client):
"""Waits for cloud-init completed"""
+ timeout = CONF.compute.cloudinit_timeout
start_time = int(time.time())
while int(time.time()) - start_time < timeout:
try:
diff --git a/tempest/config.py b/tempest/config.py
index 3ccce49..d032657 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -349,6 +349,9 @@
help="Timeout in seconds to wait for an instance to build. "
"Other services that do not define build_timeout will "
"inherit this value."),
+ cfg.IntOpt('cloudinit_timeout',
+ default=90,
+ help="Timeout in seconds to wait for a cloudinit on VM."),
cfg.IntOpt('ready_wait',
default=0,
help="Additional wait time for clean state, when there is "
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 20abbb7..28127c9 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -1404,12 +1404,12 @@
return self.create_server(**create_kwargs)
def wait_for_cloud_init(
- self, ip_address, server, private_key, username, timeout=60):
+ self, ip_address, server, private_key, username):
ssh_client = self.get_remote_client(ip_address,
private_key=private_key,
server=server,
username=username)
- waiters.wait_for_cloudinit(ssh_client, timeout)
+ waiters.wait_for_cloudinit(ssh_client)
def create_volume_from_image(self, **kwargs):
"""Create volume from image.