The functional tests that are shelved offloaded instances and
asserted that the resource allocation of the instance are
freed were unstable. These tests only waited for the instance
state to become SHELVED_OFFLOADED before checked the allocations.
However the compute manager sets the instance state to
SHELVED_OFFLOADED before deleting the allocations[1]. Therefore these
tests were racy.
With this patch the test will wait not only for the instance status to
change but also for the instance host to be nulled as that happens
after the resources are freed.
Reviewed: https:/ /review. openstack. org/509818 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=888482c9b4f b8a1bc23d475830 1e319b7c5bc997
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 888482c9b4fb8a1 bc23d4758301e31 9b7c5bc997
Author: Balazs Gibizer <email address hidden>
Date: Thu Oct 5 14:01:35 2017 +0200
fix unstable shelve offload functional tests
The functional tests that are shelved offloaded instances and OFFLOADED before deleting the allocations[1]. Therefore these
asserted that the resource allocation of the instance are
freed were unstable. These tests only waited for the instance
state to become SHELVED_OFFLOADED before checked the allocations.
However the compute manager sets the instance state to
SHELVED_
tests were racy.
With this patch the test will wait not only for the instance status to
change but also for the instance host to be nulled as that happens
after the resources are freed.
[1] https:/ /github. com/openstack/ nova/blob/ e4f89ed5dd42591 88d020749fa8fb1 c77be2c03a/ nova/compute/ manager. py#L4502- L4521
Change-Id: Ibb90571907cafc b649284e4ea3081 0a307f1737e 9e16b78178ae587 4a30f3e0da)
Closes-Bug: #1721514
(cherry picked from commit b5dca17f74b7a78