OS vmedia - post rebuild ACTIVE + SHUTOFF is ok

When performing node cleaning the server status after rebuild will be
SHUTOFF. Let's allow both ACTIVE and SHUTOFF as good states after server
rebuild.

Change-Id: I416f48833ffa0dc8c08352a6ba355a8393ef922c
This commit is contained in:
Harald Jensås
2025-02-11 23:34:21 +01:00
parent 9a5c11936a
commit c4e8c52d1a

View File

@@ -672,7 +672,7 @@ class OpenStackDriver(AbstractSystemsDriver):
while server.status == 'REBUILD':
server = self._cc.compute.get_server(identity)
time.sleep(1)
if server.status != 'ACTIVE':
if server.status not in ('ACTIVE', 'SHUTOFF'):
raise error.FishyError('Server rebuild attempt resulted in '
'status %s' % server.status)
self._logger.debug(
@@ -719,7 +719,7 @@ class OpenStackDriver(AbstractSystemsDriver):
while server.status == 'REBUILD':
server = self._cc.compute.get_server(identity)
time.sleep(1)
if server.status != 'ACTIVE':
if server.status not in ('ACTIVE', 'SHUTOFF'):
raise error.FishyError(
'Server rebuild attempt resulted in status %s'
% server.status)