Always wait server active status on rebuild
In some cases server rebuild may take long time. While
server is in the REBUILD state, it may be not powered off yet so it is still accessible via ssh. We need to make sure it reached ACTIVE state
before starting checking availability via ssh.
Related-Prod: https://mirantis.jira.com/browse/PRODX-42996
Change-Id: Id791fceb3b89d0f2c8a34a1cc5913938b5cdfe5a
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index f8b621b..55bf730 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -99,14 +99,13 @@
def _rebuild_server_and_check(self, image_ref, server):
rebuilt_server = (self.client.rebuild_server(server['id'], image_ref)
['server'])
+ waiters.wait_for_server_status(self.client, server['id'],
+ 'ACTIVE')
if CONF.validation.run_validation:
tenant_network = self.get_tenant_network()
compute.wait_for_ssh_or_ping(
server, self.os_primary, tenant_network,
True, self.validation_resources, "SSHABLE", True)
- else:
- waiters.wait_for_server_status(self.client, server['id'],
- 'ACTIVE')
msg = ('Server was not rebuilt to the original image. '
'The original image: {0}. The current image: {1}'