Fix gate issue in scenario test

The host reservation scenario test fails because of a bug in Nova:
https://bugs.launchpad.net/nova/+bug/1693438. This patch is a temporary
workaround until the issue is fixed in Nova.

Change-Id: I50b6c92ab930f70479f4524ea675509019567f6a
changes/30/467530/5
Masahito Muroi 6 years ago committed by Pierre Riteau
parent 9769502bd4
commit 124ac0557a

@ -130,6 +130,17 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest):
server = self.create_server(clients=self.admin_manager,
wait_until=None,
**create_kwargs)
waiters.wait_for_server_status(self.admin_manager.servers_client,
server['id'], 'ERROR',
raise_on_error=False)
# TODO(masahito) the try-except statement is a quick fix for nova's bug
# https://bugs.launchpad.net/nova/+bug/1693438. After fixing the bug
# remove the try-except. extra_timeout argument is added for ensuring
# the server remains in BUILD status longer than instance boots time.
try:
waiters.wait_for_server_status(self.admin_manager.servers_client,
server['id'], 'ERROR',
raise_on_error=False,
extra_timeout=100)
except exceptions.TimeoutException:
# check the server's status remains in BUILD status
waiters.wait_for_server_status(self.admin_manager.servers_client,
server['id'], 'BUILD')

Loading…
Cancel
Save