Perform old-style local delete for shelved offloaded instances
This fixes a regression from some local delete code added for cells v2
where it assumed that if an instance did not have a host, it wasn't
scheduled to a cell yet. That assumption misses the fact that the
instance won't have a host if it was shelved offloaded. And to be
shelved offloaded, the instance had to have first been built on a host
in a cell.
So we simply duplicate the same check as later in the _delete() method
for instance.host or shelved-offloaded to decide what the case is.
Obviously this is all a giant mess of duplicate delete path code that
needs to be unwound, and that's the plan, but first we're fixing
regressions and then we can start rolling this duplication all back
so we can get back to the single local delete flow that we know and love.
Change-Id: Ie2063f621618c1d90aeb59f0f1d7da351862ea9f
Closes-Bug: #1678326
(cherry picked from commit 9245bbf79ddbfd8a2e2310af654711f9d3a547b1)
Reviewed: https:/ /review. openstack. org/454414 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6384e935be1 47d3f454c264703 136c5e82eebafd
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit 6384e935be147d3 f454c264703136c 5e82eebafd
Author: Matt Riedemann <email address hidden>
Date: Wed Apr 5 16:27:41 2017 -0400
Perform old-style local delete for shelved offloaded instances
This fixes a regression from some local delete code added for cells v2
where it assumed that if an instance did not have a host, it wasn't
scheduled to a cell yet. That assumption misses the fact that the
instance won't have a host if it was shelved offloaded. And to be
shelved offloaded, the instance had to have first been built on a host
in a cell.
So we simply duplicate the same check as later in the _delete() method
for instance.host or shelved-offloaded to decide what the case is.
Obviously this is all a giant mess of duplicate delete path code that
needs to be unwound, and that's the plan, but first we're fixing
regressions and then we can start rolling this duplication all back
so we can get back to the single local delete flow that we know and love.
Change-Id: Ie2063f621618c1 d90aeb59f0f1d7d a351862ea9f a2e2310af654711 f9d3a547b1)
Closes-Bug: #1678326
(cherry picked from commit 9245bbf79ddbfd8