From 3e210b443dab76f6f4e4091d7d867658c75586c1 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 14 Nov 2016 18:09:54 -0500 Subject: [PATCH] api-ref: body verification for force_complete server migration This completes the body verification for the force_complete action for server migrations. This is only supported with microversion >= 2.22 and only for in-progress live migrations, on unlocked servers that are in active/migrating status. There is also a note as not all compute drivers support this action. See bug 1641753 for details. Part of blueprint api-ref-in-rst-ocata Change-Id: I9cd6cf35b4b5828f0f4acde168cda2beedd902f4 --- api-ref/source/server-migrations.inc | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/api-ref/source/server-migrations.inc b/api-ref/source/server-migrations.inc index d958f744b7ee..36f2d53b5987 100644 --- a/api-ref/source/server-migrations.inc +++ b/api-ref/source/server-migrations.inc @@ -117,6 +117,44 @@ Force Migration Complete Action (force_complete Action) .. rest_method:: POST /servers/{server_id}/migrations/{migration_id}/action +Force an in-progress live migration for a given server to complete. + +Specify the ``force_complete`` action in the request body. + +.. note:: Microversion 2.22 or greater is required for this API. + +.. note:: Not all compute back ends support forcefully completing an + in-progress live migration. + +Policy defaults enable only users with the administrative role to perform +this operation. Cloud providers can change these permissions through the +``policy.json`` file. + +**Preconditions** + +The server OS-EXT-STS:vm_state value must be ``active`` and the server +OS-EXT-STS:task_state value must be ``migrating``. + +If the server is locked, you must have administrator privileges to force the +completion of the server migration. + +The migration status must be ``running``. + +**Asynchronous Postconditions** + +After you make this request, you typically must keep polling the server status +to determine whether the request succeeded. + +**Troubleshooting** + +If the server status remains ``ACTIVE`` for an inordinate amount of time, the +request may have failed. Ensure you meet the preconditions and run the request +again. If the request fails again, investigate the compute back end. + +Normal response codes: 202 + +Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409) + Request -------