When the compute host recovers from a failure the compute manager
destroys instances that were evacuated from the host while it was down.
However these code paths only consider evacuated instances that are
still reported by the hypervisor. This means that if the compute
host is recovered in a way that the hypervisor lost the definition
of the instances (for example the compute host was redeployed) then
the allocation of these instances will not be deleted.
This patch makes sure that the instance allocation is cleaned up
even if the driver doesn't return that instance as exists on the
hypervisor.
Note: test_compute_mgr.py is needed to be changed, due to patch
I7891b98f225f97ad47f189afb9110ef31c810717 is missing from stable/pike
Change-Id: I4bc81b482380c5778781659c4d167a712316dab4
Closes-Bug: #1724172
(cherry picked from commit 9cacaad14e8c18e99e85d9dc04308fee91303f8f)
(cherry picked from commit b8f2cd689f0a747778080ba4b6e148e71eb53085)
(cherry picked from commit 09de94e39bbcfc7f8130638e73a8248e49cb6ab7)
(cherry picked from commit 52e68f121eda49dbb817404d3ab1468c2059e1a3)
Reviewed: https:/ /review. opendev. org/687912 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=07a938d388b 03a641c677a9375 99cfea4e36a13a
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 07a938d388b03a6 41c677a937599cf ea4e36a13a
Author: Balazs Gibizer <email address hidden>
Date: Tue Oct 17 15:06:59 2017 +0200
cleanup evacuated instances not on hypervisor
When the compute host recovers from a failure the compute manager
destroys instances that were evacuated from the host while it was down.
However these code paths only consider evacuated instances that are
still reported by the hypervisor. This means that if the compute
host is recovered in a way that the hypervisor lost the definition
of the instances (for example the compute host was redeployed) then
the allocation of these instances will not be deleted.
This patch makes sure that the instance allocation is cleaned up
even if the driver doesn't return that instance as exists on the
hypervisor.
Note: test_compute_mgr.py is needed to be changed, due to patch 5f97ad47f189afb 9110ef31c810717 is missing from stable/pike
I7891b98f22
Change-Id: I4bc81b482380c5 778781659c4d167 a712316dab4 99e85d9dc04308f ee91303f8f) 778080ba4b6e148 e71eb53085) f8130638e73a824 8e49cb6ab7) bb817404d3ab146 8c2059e1a3)
Closes-Bug: #1724172
(cherry picked from commit 9cacaad14e8c18e
(cherry picked from commit b8f2cd689f0a747
(cherry picked from commit 09de94e39bbcfc7
(cherry picked from commit 52e68f121eda49d