nova/nova/conductor
Matt Riedemann 5a98135650 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.

Conflicts:
      nova/tests/unit/conductor/test_conductor.py

NOTE(mriedem): The conflict is due to not having change
Ibfb0a6db5920d921c4fc7cabf3f4d2838ea7f421 in Rocky.
Also note that the call to _cleanup_when_reschedule_fails does not
pass a "legacy_request_spec" variable since change
If8a13f74d2b3c99f05365eb49dcfa01d9042fefa is not in Rocky.

Change-Id: I6bfa6fa767403fb936a6ae340b8687eb161732fc
Partial-Bug: #1781286
(cherry picked from commit 38fb7f82ab)
(cherry picked from commit b5e6c389d7)
(cherry picked from commit 53bcf0b1ee)
2019-10-02 16:40:49 -04:00
..
tasks Update instance.availability_zone during live migration 2019-03-13 18:14:19 -04:00
__init__.py Remove conductor local api:s and 'use_local' config option 2016-10-18 14:26:06 +02:00
api.py In Python3.7 async is a keyword [1] 2018-07-20 12:21:34 -04:00
manager.py Handle get_host_availability_zone error during reschedule 2019-10-02 16:40:49 -04:00
rpcapi.py Merge "conf: Remove '[conductor] topic' opt" 2018-03-13 08:00:43 +00:00