nova/nova/compute
Matt Riedemann b36c44c449 Handle legacy request spec dict in ComputeTaskManager._cold_migrate
Prior to change I4244f7dd8fe74565180f73684678027067b4506e in Stein,
conductor would pass a legacy dict request spec to compute during
cold migrate / resize and if compute rescheduled it would not pass
the request spec back to conductor, so the _cold_migrate method in
conductor would have to create a new RequestSpec from components
it had available.

As of that change, compute will send the request spec it got back
to conductor and _cold_migrate avoids the RequestSpec.from_components
call.

There are two issues here:

1. Technically if conductor RPC API is pinned to less than 1.13 the
   ComputeTaskAPI.migrate_server method will remove the request spec
   from the call to conductor. So conductor (server-side) can still
   not get a RequestSpec and need to use from_components. As a result
   the TODO in the _cold_migrate method needs to be updated since we
   require an RPC API major version bump to make request spec required.

2. Just because conductor is passing compute a RequestSpec object, if
   compute RPC API versions are pinned to less than 5.1, conductor will
   pass a legacy request spec dict to compute and compute will send that
   back to conductor, so the _cold_migrate method needs to handle getting
   a request spec that is a dict and convert it to an object. A new test
   is added for that case.

Change-Id: I188b7aa9cb220f93e69a68f0c3592b28d41ba5b6
Closes-Bug: #1843090
2019-09-24 14:36:01 -04:00
..
monitors hacking: Resolve W503 (line break occurred before a binary operator) 2019-06-24 14:24:06 -05:00
__init__.py Remove nova.compute.*API() shims 2019-06-12 16:09:46 +01:00
api.py Skip querying resource request in revert_resize if no qos port 2019-09-12 17:43:16 +02:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
claims.py Introduce live_migration_claim() 2019-09-03 12:10:40 -04:00
flavors.py Remove deprecated 'default_flavor' config option 2019-04-30 13:01:40 +00:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Plumbing for ignoring list_records_by_skipping_down_cells 2019-02-08 16:28:28 -05:00
manager.py Merge "Refactor pre-live-migration work out of _do_live_migration" 2019-09-23 20:22:04 +00:00
migration_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
multi_cell_list.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
resource_tracker.py Merge "Claim resources in resource tracker" 2019-09-15 20:13:54 +00:00
rpcapi.py Handle legacy request spec dict in ComputeTaskManager._cold_migrate 2019-09-24 14:36:01 -04:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2018-09-12 13:05:29 +03:00
utils.py Add nova.compute.utils.delete_image 2019-08-27 14:26:33 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00