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: '<Network Name>'

Closes-Bug: 2086461
Change-Id: I21c5a81c41e771f7566bf19cac8e3b8f5f190b27
This commit is contained in:
Ilya Popov 2024-11-05 20:51:58 +03:00
parent 2731314d44
commit 09a4373f6e

View File

@ -316,6 +316,7 @@ class AttachInterfacesTestJSON(AttachInterfacesTestBase):
_, servers = compute.create_test_server( _, servers = compute.create_test_server(
self.os_primary, tenant_network=network, self.os_primary, tenant_network=network,
validatable=True, validatable=True,
wait_until='ACTIVE',
validation_resources=validation_resources) validation_resources=validation_resources)
return servers[0] return servers[0]