bf89a23d91
When evacuating an instance the evacuation migration record moves from a state of `accepted` to `pre-migrating` and eventually `done` once the instance has been rebuilt on the new compute host. At present the migration record remains in this state until the original compute host is restarted and the service cleans up any leftovers of the instance before it is moved to a state of `completed`. Bug #1922053 details a use case where an operator might unintentionally forget to ensure the compute service is restarted before forcing the service up leaving evacuation migration records stuck as `done`. This could become an issue in the future if the instance is moved back to this compute before the service is restarted. Any future restart invoking the cleanup logic and potentially damaging the running instance. This change aims to address this by blocking requests to force up computes associated to `done` evacuation records. Forcing operators to restart the service allowing them to move to a `completed` state before the service can be forced up again. To allow this to be backportable these requests are rejected with a 400 BadRequest return code from the API. A TODO is left to move this to a 409 Conflict during the Xena release under a new microversion. Finally, some additional functional tests have been updated to ensure they restart the source compute service of an evacuation before attempting to force up the service, ensuring any migration records are marked as completed. Closes-Bug: #1922053 Change-Id: I95882ea28564a31a6b4f8b665de462774d84edfc |
||
---|---|---|
.. | ||
metadata | ||
openstack | ||
validation | ||
__init__.py | ||
auth.py | ||
compute_req_id.py | ||
wsgi.py |