nova/nova/compute
Guang Yee 0f2d87416e make sure to rebuild claim on recreate
On recreate where the instance is being evacuated to a different node,
we should be rebuilding the claim so the migration context is available
when rebuilding the instance.

Conflicts:
      nova/compute/manager.py
      nova/tests/unit/compute/test_compute_mgr.py

NOTE(mriedem): There are a few issues here:

1. I5aaa869f2e6155964827e659d18e2bcaad9d866b changed the LOG.info
   method to not pass a context in Ocata.
2. I57233259065d887b38a79850a05177fcbbdfb8c3 changed some tests in
   test_compute_manager in Ocata, but is irrelevant here.
3. The bigger change isn't a merge conflict but in Ocata the compute
   manager code was all refactored so that the _get_resource_tracker
   method no longer needed a nodename passed to it. In Newton, however,
   if we're force evacuating (scenario 3) then we don't have a scheduled_node
   passed to the rebuild_instance method and in this case we need to
   lookup the nodename for the host we're currently on. To resolve this,
   some existing code that handles this case is moved up where it is
   needed to get the resource tracker so we can get the rebuild_claim method.
   We let any ComputeHostNotFound exception raise up in this case rather than
   log it because without the compute node we can't make the rebuild claim and
   we need to fail. Tests are adjusted accordingly for this.

Change-Id: I53bdcf8edf640e97b4632ef7a093f14a6e3845e4
Closes-Bug: 1658070
(cherry picked from commit a2b0824aca)
(cherry picked from commit ea90c60b07)
2017-06-07 20:55:15 +00:00
..
monitors Fix invalid import order 2016-07-04 11:23:52 +05:30
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Handle MarkerNotFound from cell0 database 2016-12-07 01:38:29 +00:00
arch.py Add amd64 to arch.canonicalize() 2014-09-08 08:08:00 -07:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Handle ObjectActionError during cells instance delete 2016-09-08 15:42:36 -04:00
claims.py Fix drop_move_claim() on revert resize 2016-10-10 10:05:20 +01:00
cpumodel.py Add VirtCPUModel nova objects 2015-02-09 10:26:10 +11:00
flavors.py Return 400 HTTP error for invalid flavor attributes 2016-05-26 09:49:39 +05:30
hv_type.py Add 'lxd' to the list of recognized hypervisors 2015-11-17 08:56:20 +00:00
instance_actions.py Report instance-actions for live migration force complete API 2016-03-10 15:02:35 +00:00
manager.py make sure to rebuild claim on recreate 2017-06-07 20:55:15 +00:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
resource_tracker.py Merge "Fix drop_move_claim() on revert resize" into stable/newton 2016-10-17 00:39:59 +00:00
rpcapi.py Send events to all relevant hosts if migrating 2016-11-01 12:08:38 -04:00
stats.py Address nits in I83a5f06ad 2016-03-09 13:19:59 +00:00
task_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
utils.py Transform instance.delete notifications 2016-06-30 16:54:51 +02:00
vm_mode.py Convert nova.compute.* to use instance dot notation 2015-02-25 17:21:36 -05:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00