Abort an ongoing live migration

Bug #1550525 reported by OpenStack Infra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned

Bug Description

https://review.openstack.org/277971
Dear bug triager. This bug was created since a commit was marked with DOCIMPACT.
Your project "openstack/nova" is set up so that we directly report the documentation bugs against it. If this needs changing, the docimpact-group option needs to be added for the project. You can ask the OpenStack infra team (#openstack-infra on freenode) for help if you need to.

commit fa002925460e70d988d1b4dd1ea594c680a43740
Author: Andrea Rosa <email address hidden>
Date: Fri Feb 5 08:31:06 2016 +0000

    Abort an ongoing live migration

    This change adds a DELETE call on the server-migrations object to cancel
    a running live migration of a specific instance.
    TO perform the cancellation the virtualization driver needs to support
    it, in case that the feature is not supported we return an error.
    We allow a cancellation of a migration only if the migration is
    running at the moment of the request and if the migration type is equal
    to 'live-migration'.
    In this change we implement this feature for the libvirt driver.
    When the cancellation of a live migration succeeded we rollback the live
    migration and we set the state of the Migration object equals to
    'cancelled'.
    The implementation of this change is based on the work done by the
    implementation of the feature called 'force live migration':
    https://review.openstack.org/245921

    DocImpact
    ApiImpact

    Implements blueprint: abort-live-migration
    Change-Id: I1ff861e54997a069894b542bd764ac3ef1b3dbb2

Tags: doc nova
Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
Changed in nova:
assignee: nobody → Andrea Rosa (andrea-rosa-m)
Revision history for this message
Andrea Rosa (andrea-rosa-m) wrote :

With the Nova API version 2.24 we have introduced the ability to abort an ongoing live-migration of an instance.
The new API is a DELETE on the server-migrations object

DELETE /servers/{id}/migrations{id}
Nothing needs to be passed in the body.

The call to complete successfully requires that the virtualization driver supports the cancellation of the live-migration.
At the moment the feature is implemented just for the libvirt driver, if the driver doesn't support the cancellation the results of the API call will be an error.
The call is enabled just for Admin user.

To perform a cancellation of a migration, the migration must be in the running state and the migration-type equals to 'live-migration'.
If the cancellation call succeeded then the libvirt driver performs a rollback of the live migration and the state of the Migration object is set to 'cancelled'.

If the request is accepted the http response code is `202 Accepted`

The expected error returned are:

`400 Bad Request`
 - the instance state is invalid for cancellation, i.e. the task state is not 'migrating' or the migration is not in a running
state and the type is 'live-migration'

`403 Forbidden`
- Policy violation if the caller is not granted access to 'os_compute_api:servers:migrations:delete' in policy.json

`404 Not found`
- the server doesn't exist
- the migration doesn't exist

`409 Conflict`
- if the instance is not in the valid state for calling the abort of live migration.

Revision history for this message
Andrea Rosa (andrea-rosa-m) wrote :

I added details Ito describe the new feature introduced in nova by the 2.24 version, please let me know more information are required.
I think that the new feature needs to be documented in the API guide.

affects: nova → openstack-api-site
affects: openstack-api-site → openstack-manuals
affects: openstack-manuals → openstack-api-site
Changed in openstack-api-site:
assignee: Andrea Rosa (andrea-rosa-m) → nobody
Changed in openstack-api-site:
assignee: nobody → Sharat Sharma (sharat-sharma)
status: Confirmed → In Progress
affects: openstack-api-site → nova
Changed in nova:
status: In Progress → New
assignee: Sharat Sharma (sharat-sharma) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Looks like this was fixed in https://review.openstack.org/#/c/397407/

Changed in nova:
status: New → Confirmed
status: Confirmed → Fix Released
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.