nova/nova/tests/unit/scheduler
Matt Riedemann e4601c77fb 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
2020-08-26 14:50:07 +01:00
..
client Reduce gen conflict in COMPUTE_STATUS_DISABLED handling 2020-07-10 17:38:13 +02:00
filters Remove deprecated scheduler filters 2020-08-11 13:25:59 +00:00
weights Don't recompute weighers' minval/maxval attributes 2020-04-01 11:46:48 +02: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 Fix mock for 'autospec' and 'new' together 2020-07-06 16:11:15 +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-08-26 14:50:07 +01:00
test_manager.py trivial: Remove FakeScheduler 2020-02-18 15:13:45 +00:00
test_request_filter.py Switch from unittest2 compat methods to Python 3.x methods 2020-06-23 14:16:07 +02: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 Use 'Exception.__traceback__' for versioned notifications 2020-06-08 14:38:33 +01:00
test_utils.py Merge "scheduler: Request vTPM trait based on flavor or image" 2020-07-24 09:23:54 +00:00