nova/nova/tests/unit/conductor
Matt Riedemann 53bcf0b1ee Handle get_host_availability_zone error during reschedule
If a build fails and reschedules to a cell conductor which does
not have access to the API DB, the call to get_host_availability_zone
will fail with a CantStartEngineError because it's trying to do an
"up-call" to the API DB for host aggregate info. The reschedule
fails and the instance is stuck in BUILD status without a fault
injected for determining what went wrong.

This change simply handles the failure and cleans up so the instance
is put into a terminal (ERROR) state.

NOTE(mriedem): The fill_provider_mapping mock on the unit test is
removed since that method did not exist in Stein, it was introduced
in Train: I76f777e4f354b92c55dbd52a20039e504434b3a1

Change-Id: I6bfa6fa767403fb936a6ae340b8687eb161732fc
Partial-Bug: #1781286
(cherry picked from commit 38fb7f82ab)
(cherry picked from commit b5e6c389d7)
2019-10-02 15:43:40 -04:00
..
tasks Merge "Update instance.availability_zone during live migration" 2019-03-13 23:25:11 +00:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_conductor.py Handle get_host_availability_zone error during reschedule 2019-10-02 15:43:40 -04:00