Remove dest node allocation if evacuate MoveClaim fails
If the MoveClaim during an evacuate fails we need to
remove the destination node allocation since the
ResourceTracker isn't going to do it.
This also fixes test_rebuild_server_exc which was faking
a rebuild failure by raising an error that would not
actually happen during a rebuild. ComputeResourcesUnavailable
only happens if a claim fails, and for a rebuild, which
is on the same host that the instance is already on, doesn't
involve a claim attempt.
Change-Id: I59ff47bf773c9831d0f44e1caf7877fe08c911c3
Closes-Bug: #1713786
(cherry picked from commit 5bc137f7ebc266f8a73d6febc7c10d8d648924e0)
Reviewed: https:/ /review. openstack. org/503165 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=21d7f8b11f2 17b7e5ece6868a0 6df70a7a065b6b
Committed: https:/
Submitter: Jenkins
Branch: stable/pike
commit 21d7f8b11f217b7 e5ece6868a06df7 0a7a065b6b
Author: Matt Riedemann <email address hidden>
Date: Fri Sep 1 09:58:03 2017 -0400
Remove dest node allocation if evacuate MoveClaim fails
If the MoveClaim during an evacuate fails we need to
remove the destination node allocation since the
ResourceTracker isn't going to do it.
This also fixes test_rebuild_ server_ exc which was faking sUnavailable
a rebuild failure by raising an error that would not
actually happen during a rebuild. ComputeResource
only happens if a claim fails, and for a rebuild, which
is on the same host that the instance is already on, doesn't
involve a claim attempt.
Change-Id: I59ff47bf773c98 31d0f44e1caf787 7fe08c911c3 8a73d6febc7c10d 8d648924e0)
Closes-Bug: #1713786
(cherry picked from commit 5bc137f7ebc266f