Fix Tripleo reboot method

So far the Triple reboot_method tried to re-activate the affected
servers (which are supposed to be shutoff due to the compute reboot)
before they were in the SHUTOFF status (and hence no action would
occur).

This patch fixes the Triple reboot method by making nova to wait
for the servers to be on SHUTOFF status before re-activating them.

Change-Id: Ic8d71fa0bf5f08ef15a53b6e500e3905e5886d26
This commit is contained in:
Omer 2021-10-19 13:46:39 +02:00 committed by Federico Ressi
parent 454a63f4e6
commit ce7f21eeb0

View File

@ -157,6 +157,8 @@ class TripleoTopologyNode(topology.OpenStackTopologyNode):
if reactivate_servers: if reactivate_servers:
for server in servers_to_restart: for server in servers_to_restart:
nova.wait_for_server_status(server=server.id,
status='SHUTOFF')
LOG.debug(f'Server {server.name} with ID {server.id} ' LOG.debug(f'Server {server.name} with ID {server.id} '
f'had a SHUTOFF status before being ' f'had a SHUTOFF status before being '
f'restarted') f'restarted')