Unhardcode cloudinit wait timeout
Bump it to 90 sec to work on slover environments
Related-Prod: PRODX-48888
Change-Id: I91e9a50c2f51ba40260e8347e38d7aa477a2cd59
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index 36c2b8b..ae0bd76 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -679,8 +679,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 cffeb35..d5eeb21 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -348,6 +348,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 212c1b3..94cc3bd 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -1342,12 +1342,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.