nova/nova
Matt Riedemann a05ef30fb9 Make API always RPC cast to conductor for resize/migrate
This is a follow up to [1] to make the API behave consistently
by always asynchronously casting to conductor during resize
and cold migration regardless of same-cell or cross-cell
migration.

From the end user point of view, not much changes besides
the possibility of some exceptions occurring during scheduling
which would have resulted in a 400 BadRequest error.
The user still gets a 202 response, must poll the server status
until the server goes to VERIFY_RESIZE status or times out, and
can check the instance actions if the resize/migrate fails.

The specific errors that can occur are not really an API contract
and as such end user applications should not be building logic
around, for example, getting a NoValidHost error. It should be
noted, however, that by default non-admin users cannot see
the instance action event traceback that would contain the
error, e.g. NoValidHost.

The only exception types removed from handling in the API are
(1) AllocationMoveFailed which can be raised when the conductor
MigrationTask runs replace_allocation_with_migration and
(2) NoValidHost when the scheduler is called to select destinations.

Because of this, quite a few functional negative tests have to be
adjusted since the API no longer returns a 400 for NoValidHost and
other errors that can happen during scheduling.

Finally, the do_cast kwarg is left on the conductor API method since
the compute service calls it during same-cell reschedule as a
synchronous RPC call and has error handling if rescheduling in
conductor fails.

[1] I098f91d8c498e5a85266e193ad37c08aca4792b2

Change-Id: I711e56bcb4b72605253fa63be230a68e03e45b84
2019-11-13 10:19:53 -05:00
..
api Make API always RPC cast to conductor for resize/migrate 2019-11-13 10:19:53 -05:00
cmd Merge "Do not print default dicts during heal_allocations" 2019-10-02 16:04:36 +00:00
compute Make API always RPC cast to conductor for resize/migrate 2019-11-13 10:19:53 -05:00
conductor Merge "Resolve TODO in _remove_host_allocations" 2019-11-12 11:21:36 +00:00
conf Use long_rpc_timeout in conductor migrate_server RPC API call 2019-11-01 10:14:34 -04:00
console Merge "objects: Remove ConsoleAuthToken.to_dict" 2019-09-06 18:51:31 +00:00
db Remove redundant call to get/create default security group 2019-10-14 18:54:43 +00:00
hacking Add a hacking rule for useless assertions 2019-08-21 14:42:53 +09:00
image Improve error log when snapshot fails 2019-11-06 22:54:05 +00:00
ipv6
keymgr
locale Imported Translations from Zanata 2019-03-22 06:26:27 +00:00
network Use admin neutron client to gather port resource requests 2019-11-06 15:39:54 -05:00
notifications Add Aggregate image caching progress notifications 2019-10-29 08:18:32 -07:00
objects Make API always RPC cast to conductor for resize/migrate 2019-11-13 10:19:53 -05:00
pci hacking: Resolve W605 (invalid escape sequence) 2019-06-24 14:24:06 -05:00
policies Add new policy rule for viewing host status UNKNOWN 2019-10-28 15:40:08 +00:00
privsep libvirt: Support VM creation with vpmems and vpmems cleanup 2019-09-13 08:50:35 +00:00
scheduler Refresh instance in MigrationTask.execute Exception handler 2019-11-05 14:16:10 -05:00
servicegroup [Trivial fix]Remove unnecessary slash 2019-05-06 16:23:59 +08:00
tests Make API always RPC cast to conductor for resize/migrate 2019-11-13 10:19:53 -05:00
virt Merge "Add missing parameter" 2019-10-31 11:09:12 +00:00
vnc xvp: Remove use of '_LI' marker 2019-06-19 10:04:45 +01:00
volume Fix exception translation when creating volume 2019-10-10 02:38:33 +00:00
__init__.py Eventlet monkey patching should be as early as possible 2019-03-22 09:27:16 +00:00
availability_zones.py Always pass HostAPI to get_availability_zones 2019-04-26 15:30:48 -04:00
baserpc.py
block_device.py hacking: Resolve W605 (invalid escape sequence) 2019-06-24 14:24:06 -05:00
cache_utils.py
config.py Rename 'nova.common.config' module to 'nova.middleware' 2019-08-16 00:53:03 +01:00
context.py Revert "Log CellTimeout traceback in scatter_gather_cells" 2019-10-22 17:12:28 -04:00
crypto.py
debugger.py
exception.py Remove unused CannotMigrateWithTargetHost 2019-11-12 09:47:54 -05:00
exception_wrapper.py
filters.py filters: Stop handling cells v1 2019-06-12 16:09:46 +01:00
hooks.py
i18n.py
loadables.py
manager.py
middleware.py Rename 'nova.common.config' module to 'nova.middleware' 2019-08-16 00:53:03 +01:00
monkey_patch.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
policy.py Pass RequestContext to oslo_policy 2019-10-29 15:21:50 +00:00
profiler.py
quota.py Log quota legacy method warning only if counting from placement 2019-06-17 21:31:53 +00:00
rpc.py Remove unnecessary wrapper 2019-05-29 17:14:13 +01:00
safe_utils.py
service.py Remove nova-consoleauth 2019-07-05 15:04:47 +00:00
service_auth.py
test.py Only allow one scheduler service in tests 2019-10-30 19:44:17 +00:00
utils.py Remove workaround for bug #1709118 2019-10-07 16:33:20 +00:00
version.py
weights.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
wsgi.py