commit 5f3c33a4f12a40e5b5d9fef2a1b5345f5ff5cd04
Author: Matt Riedemann <email address hidden>
Date: Mon Dec 16 16:15:24 2019 -0500
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 e4601c77fb3b90638a6a56ec1a8e0e9eb7c91777)
Reviewed: https:/ /review. opendev. org/748369 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5f3c33a4f12 a40e5b5d9fef2a1 b5345f5ff5cd04
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 5f3c33a4f12a40e 5b5d9fef2a1b534 5f5ff5cd04
Author: Matt Riedemann <email address hidden>
Date: Mon Dec 16 16:15:24 2019 -0500
Ensure source compute is up when confirming a resize
When _poll_unconfirm ed_resizes runs or a user tries to confirm unconfirmed_ resizes will not be able to auto-confirm the
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_
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.
SingleCellS imple._ fake_target_ cell is updated so that tests using context. target_ cell. As a result some HostManager unit tests
it can assert when a context was targeted without having to stub
nova.
needed to be updated.
Change-Id: I33aa5e32cb321e 5a16da51e227af2 f67ed9e6713 38a6a56ec1a8e0e 9eb7c91777)
Closes-Bug: #1855927
(cherry picked from commit e4601c77fb3b906