Abort an ongoing live migration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
https:/
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 fa002925460e70d
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:/
DocImpact
ApiImpact
Implements blueprint: abort-live-
Change-Id: I1ff861e54997a0
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Andrea Rosa (andrea-rosa-m) |
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 |
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` api:servers: migrations: delete' in policy.json
- Policy violation if the caller is not granted access to 'os_compute_
`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.