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.
Reviewed: https:/ /review. openstack. org/453859 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=9245bbf79dd bfd8a2e2310af65 4711f9d3a547b1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9245bbf79ddbfd8 a2e2310af654711 f9d3a547b1
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
Closes-Bug: #1678326