nova/nova/tests/unit/scheduler
Matt Riedemann 5f3c33a4f1 Ensure source compute is up when confirming a resize
When _poll_unconfirmed_resizes runs or a user tries to confirm
a resize in the API, if the source compute service is down the
migration status will be stuck in "confirming" status if it never
reached the source compute. Subsequent runs of
_poll_unconfirmed_resizes will not be able to auto-confirm the
resize nor will the user be able to manually confirm the resize.
An admin could reset the status on the server to ACTIVE or ERROR
but that means the source compute never gets cleaned up since you
can only confirm or revert a resize on a server with VERIFY_RESIZE
status.

This adds a check in the API before updating the migration record
such that if the source compute service is down the API returns a
409 response as an indication to try again later.

SingleCellSimple._fake_target_cell is updated so that tests using
it can assert when a context was targeted without having to stub
nova.context.target_cell. As a result some HostManager unit tests
needed to be updated.

Change-Id: I33aa5e32cb321e5a16da51e227af2f67ed9e6713
Closes-Bug: #1855927
(cherry picked from commit e4601c77fb)
2020-09-22 11:46:16 +01:00
..
client Use Placement 1.35 (root_required) 2020-01-07 16:46:56 -06:00
filters objects: Add 'NUMACell.pcpuset' field 2019-09-18 00:21:10 +01:00
weights Add CrossCellWeigher 2019-12-12 12:40:29 -05:00
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fakes.py Add support for translating CPU policy extra specs, image meta 2019-09-18 00:21:10 +01:00
ironic_fakes.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_filter_scheduler.py trivial: Remove FakeScheduler 2020-02-18 15:13:45 +00:00
test_filters.py filters: Stop handling cells v1 2019-06-12 16:09:46 +01:00
test_host_filters.py Modify left filters for RequestSpec 2015-12-11 12:27:20 +01:00
test_host_manager.py Ensure source compute is up when confirming a resize 2020-09-22 11:46:16 +01:00
test_manager.py trivial: Remove FakeScheduler 2020-02-18 15:13:45 +00:00
test_request_filter.py Enable and use COMPUTE_ACCELERATORS trait. 2020-03-27 22:42:37 -07:00
test_rpcapi.py Use long_rpc_timeout in select_destinations RPC call 2018-11-20 09:03:53 -05:00
test_scheduler_utils.py Remove dict compat from populate_filter_properties 2019-12-06 11:26:02 -05:00
test_utils.py Use provider mappings from Placement (mostly) 2019-12-06 11:04:55 -06:00