e4601c77fb
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 |
||
---|---|---|
.. | ||
client | ||
filters | ||
weights | ||
__init__.py | ||
fakes.py | ||
ironic_fakes.py | ||
test_filter_scheduler.py | ||
test_filters.py | ||
test_host_filters.py | ||
test_host_manager.py | ||
test_manager.py | ||
test_request_filter.py | ||
test_rpcapi.py | ||
test_scheduler_utils.py | ||
test_utils.py |