e3b68a1c8b
Prior to this patch there was a condition when no host_available was true and an exception would get raised without first cleaning up the instance. This causes instances to get indefinitely stuck in a scheduling state. This patch fixes this by calling the clean up function and then exits build_instances using a return statement. The related functional regression recreate test is updated to show this fixes the bug. NOTE(mriedem): There are three changes in this backport. First, since bug 1819460 and change I78fc2312274471a7bd85a263de12cc5a0b19fd10 do not apply to Rocky, _cleanup_when_reschedule_fails is added here. Second, the test_bug_1837955 setUp needed to stub notifications since change I017d1a31139c9300642dd706eadc265f7c954ca8 is not in Rocky to do that in ProviderUsageBaseTestCase. Third, the unit test is changed to mock _set_vm_state_and_notify since change Ibfb0a6db5920d921c4fc7cabf3f4d2838ea7f421 is not in Rocky for compute utils to call notify_about_compute_task_error. Change-Id: I6a2c63a4c33e783100208fd3f45eb52aad49e3d6 Closes-bug: #1837955 (cherry picked from commit |
||
---|---|---|
.. | ||
tasks | ||
__init__.py | ||
api.py | ||
manager.py | ||
rpcapi.py |