mirror of
https://github.com/jcwimer/openstack-exporter
synced 2026-03-25 01:44:43 +00:00
Added logic to capture instance deploy failures
This commit is contained in:
@@ -83,7 +83,17 @@ def create_instance(connection, flavor, image, network, hypervisor):
|
||||
name=f"{instance_name}",
|
||||
availability_zone=availability_zone,
|
||||
)
|
||||
server = connection.compute.wait_for_server(server, status="ACTIVE", wait=600)
|
||||
server = connection.compute.wait_for_server(
|
||||
server,
|
||||
status="ACTIVE",
|
||||
wait=600,
|
||||
failures=[
|
||||
"ERROR",
|
||||
"PAUSED",
|
||||
"SUSPENDED",
|
||||
"UNKNOWN",
|
||||
],
|
||||
)
|
||||
ip_address = server.addresses[network.name][0]['addr']
|
||||
if wait_for_ping(ip_address) is True:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user