The test_unshelve_offloaded_fails_due_to_neutron could fail due to race
condition. The test case only waits for the first instance.save() call
at [1] but the allocation delete happens after it. This causes that the
test case can still see the allocation of the offloaded server in
placement.
The fix makes sure that the test waits for the second instance.save() by
checking for the host of the instance.
Reviewed: https:/ /review. opendev. org/713682 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=763b7897f40 140b04e9f0bfcc3 76b975b85c2381
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 763b7897f40140b 04e9f0bfcc376b9 75b85c2381
Author: Balazs Gibizer <email address hidden>
Date: Mon Mar 16 14:58:46 2020 +0100
Fix intermittently failing regression case
The test_unshelve_ offloaded_ fails_due_ to_neutron could fail due to race
condition. The test case only waits for the first instance.save() call
at [1] but the allocation delete happens after it. This causes that the
test case can still see the allocation of the offloaded server in
placement.
The fix makes sure that the test waits for the second instance.save() by
checking for the host of the instance.
[1] https:/ /github. com/openstack/ nova/blob/ stable/ rocky/nova/ compute/ manager. py#L5274- L5288
Related-Bug #1862633
Change-Id: Ic1c3d35749fbdc 7f5b6f6ec1e16b8 fcf37c10de8 53a50899d6aed29 2dea4dcd7f) d77df9e54cdac3c f641049eb8)
(cherry picked from commit 1dfb72e0487c125
(cherry picked from commit c48d62184348a5b