commit e3b68a1c8bbedd877cfc988898f7e458ab067f28
Author: Erik Olof Gunnar Andersson <email address hidden>
Date: Thu Jul 25 20:19:40 2019 -0700
Cleanup when hitting MaxRetriesExceeded from no host_available
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 b98d4ba6d54f5ca2999a8fe6b6d7dfcc134061df)
(cherry picked from commit fcc2b9e33ed2b3d9f469b458e0f46011fe9883ac)
Reviewed: https:/ /review. opendev. org/673553 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e3b68a1c8bb edd877cfc988898 f7e458ab067f28
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit e3b68a1c8bbedd8 77cfc988898f7e4 58ab067f28
Author: Erik Olof Gunnar Andersson <email address hidden>
Date: Thu Jul 25 20:19:40 2019 -0700
Cleanup when hitting MaxRetriesExceeded from no host_available
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, a7bd85a263de12c c5a0b19fd10 when_reschedule _fails is added here. 00642dd706eadc2 65f7c954ca8 is not seTestCase. Third, the unit state_and_ notify since 21c4fc7cabf3f4d 2838ea7f421 is not in Rocky about_compute_ task_error.
since bug 1819460 and change I78fc2312274471
do not apply to Rocky, _cleanup_
Second, the test_bug_1837955 setUp needed to stub notifications
since change I017d1a31139c93
in Rocky to do that in ProviderUsageBa
test is changed to mock _set_vm_
change Ibfb0a6db5920d9
for compute utils to call notify_
Change-Id: I6a2c63a4c33e78 3100208fd3f45eb 52aad49e3d6 2999a8fe6b6d7df cc134061df) 9f469b458e0f460 11fe9883ac)
Closes-bug: #1837955
(cherry picked from commit b98d4ba6d54f5ca
(cherry picked from commit fcc2b9e33ed2b3d