From 09a4373f6ec13506b0b9f510bb5bfbd78f2a4a8f Mon Sep 17 00:00:00 2001 From: Ilya Popov Date: Tue, 5 Nov 2024 20:51:58 +0300 Subject: [PATCH] Wait for VM ACTIVE state is added for fixed network case When fixed network in tempest config is used for validation, IP address will be returned in REST response to get server api only after VM will be in ACTIVE state. AS it mentioned in comment in source code: " NOTE(danms): We create these with no waiters because we will wait for them to be validatable (i.e. SSHABLE) below. That way some of the server creation overlap each other and with create_port. " But wait_for_ssh_or_ping will call get_server_ip which fail for server in building state (as there is no IP in server properties) Finally we got KeyError: '' Closes-Bug: 2086461 Change-Id: I21c5a81c41e771f7566bf19cac8e3b8f5f190b27 --- tempest/api/compute/servers/test_attach_interfaces.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py index 8984d1de78..eddfd736c4 100644 --- a/tempest/api/compute/servers/test_attach_interfaces.py +++ b/tempest/api/compute/servers/test_attach_interfaces.py @@ -316,6 +316,7 @@ class AttachInterfacesTestJSON(AttachInterfacesTestBase): _, servers = compute.create_test_server( self.os_primary, tenant_network=network, validatable=True, + wait_until='ACTIVE', validation_resources=validation_resources) return servers[0]