nova/nova/api
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
..
metadata Remove six.reraise 2020-08-15 07:45:49 +00:00
openstack Ensure source compute is up when confirming a resize 2020-08-26 14:50:07 +01:00
validation Merge "scheduler: Request vTPM trait based on flavor or image" 2020-07-24 09:23:54 +00:00
__init__.py
auth.py Stop using NoAuthMiddleware in tests 2019-10-14 11:43:52 -05:00
compute_req_id.py Migrate to oslo request_id middleware - mv 2.46 2017-05-27 10:11:44 +00:00
wsgi.py trivial: Remove remaining '_LE' instances 2020-05-18 16:52:20 +01:00