commit 53bcf0b1eeb4d34cbbec6200026c9bac5921db97
Author: Matt Riedemann <email address hidden>
Date: Tue Oct 1 12:03:17 2019 -0400
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 38fb7f82abd7fffc00ebc050ee5230f1137e76d8)
(cherry picked from commit b5e6c389d733d4dbd94380add7e3fa6c4d1e3fa8)
Reviewed: https:/ /review. opendev. org/686264 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=53bcf0b1eeb 4d34cbbec620002 6c9bac5921db97
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 53bcf0b1eeb4d34 cbbec6200026c9b ac5921db97
Author: Matt Riedemann <email address hidden>
Date: Tue Oct 1 12:03:17 2019 -0400
Handle get_host_ availability_ zone error during reschedule
If a build fails and reschedules to a cell conductor which does availability_ zone Error because it's trying to do an
not have access to the API DB, the call to get_host_
will fail with a CantStartEngine
"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 2c55dbd52a20039 e504434b3a1
removed since that method did not exist in Stein, it was introduced
in Train: I76f777e4f354b9
Change-Id: I6bfa6fa767403f b936a6ae340b868 7eb161732fc c00ebc050ee5230 f1137e76d8) bd94380add7e3fa 6c4d1e3fa8)
Partial-Bug: #1781286
(cherry picked from commit 38fb7f82abd7fff
(cherry picked from commit b5e6c389d733d4d