Ask Your Question
0

How to cancel/abort cinder volume migration?

asked 2014-07-16 06:35:48 -0600

Alex Z gravatar image

updated 2014-07-16 08:14:11 -0600

SamYaple gravatar image

I try to use second cinder node and try to migrate volume from one to other. Some of first tries seems failed. I try to remove volumes, but I cannot - "Volume cannot be deleted while migrating". How to remove volumes and/or cancel/abort migration?

root@node1:~# cinder show d753ff67-1a19-45f9-925f-f19808ef3be5
+--------------------------------+---------------------------------------------+
|            Property            |                    Value                    |
+--------------------------------+---------------------------------------------+
|          attachments           |                      []                     |
|       availability_zone        |                     nova                    |
|            bootable            |                    false                    |
|           created_at           |          2014-07-16T09:11:43.000000         |
|      display_description       |                                             |
|          display_name          |                    disk2                    |
|           encrypted            |                    False                    |
|               id               |     d753ff67-1a19-45f9-925f-f19808ef3be5    |
|            metadata            |                      {}                     |
|     os-vol-host-attr:host      |             block2@store_default            |
| os-vol-mig-status-attr:migstat | target:fd97651e-71e2-4a3f-bcd9-6d211750c96a |
| os-vol-mig-status-attr:name_id |                     None                    |
|  os-vol-tenant-attr:tenant_id  |       cb0bd08bdc3a4813a4814767e7e5cc04      |
|              size              |                      5                      |
|          snapshot_id           |                     None                    |
|          source_volid          |                     None                    |
|             status             |                  available                  |
|          volume_type           |                   generic                   |
+--------------------------------+---------------------------------------------+
root@node1:~# cinder delete d753ff67-1a19-45f9-925f-f19808ef3be5
Delete for volume d753ff67-1a19-45f9-925f-f19808ef3be5 failed: Invalid volume: Volume cannot be deleted while migrating (HTTP 400) (Request-ID: req-8a716753-ef9a-48f1-9c3e-97710afdeec1)
ERROR: Unable to delete any of the specified volumes.
root@node1:~# cinder force-delete d753ff67-1a19-45f9-925f-f19808ef3be5
Delete for volume d753ff67-1a19-45f9-925f-f19808ef3be5 failed: Invalid volume: Volume cannot be deleted while migrating (HTTP 400) (Request-ID: req-3dd66ef6-658f-4925-83d3-3ccc7682b2fb)
ERROR: Unable to force delete any of the specified volumes.
root@node1:~#
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-02-17 03:09:28 -0600

idzzy gravatar image

Same issue is happen to me. How to delete the cinder volume. How to cancel cinder migration?

os-vol-mig-status-attr:migstat is not "None":

# cinder show 52a71ec9-57f2-4124-bb80-ba3d93e148e7
+--------------------------------+---------------------------------------------+
|            Property            |                    Value                    |
+--------------------------------+---------------------------------------------+
|          attachments           |                      []                     |
|       availability_zone        |                     nova                    |
|            bootable            |                    false                    |
|           created_at           |          2014-12-24T01:46:02.000000         |
|      display_description       |                                             |
|          display_name          |                 admin_vol02                 |
|           encrypted            |                    False                    |
|               id               |     52a71ec9-57f2-4124-bb80-ba3d93e148e7    |
|            metadata            |                      {}                     |
|     os-vol-host-attr:host      |                    host01                   |
| os-vol-mig-status-attr:migstat | target:11b3234e-9a1a-4378-83e9-0be6a3c027ba |
| os-vol-mig-status-attr:name_id |                     None                    |
|  os-vol-tenant-attr:tenant_id  |       a8085d1871f847bdb906ef4a28d1bd48      |
|              size              |                      1                      |
|          snapshot_id           |                     None                    |
|          source_volid          |                     None                    |
|             status             |                  available                  |
|          volume_type           |                     None                    |
+--------------------------------+---------------------------------------------+

Cannot delete:

# cinder delete 52a71ec9-57f2-4124-bb80-ba3d93e148e7
Delete for volume 52a71ec9-57f2-4124-bb80-ba3d93e148e7 failed: Invalid volume: Volume cannot be deleted while migrating (HTTP 400) (Request-ID: req-6cccba6d-094d-4f7e-9087-1242793a351e)
ERROR: Unable to delete any of the specified volumes.


# cinder force-delete 52a71ec9-57f2-4124-bb80-ba3d93e148e7
Delete for volume 52a71ec9-57f2-4124-bb80-ba3d93e148e7 failed: Invalid volume: Volume cannot be deleted while migrating (HTTP 400) (Request-ID: req-a1411f10-0a55-4918-ab39-cc80f73d2568)
ERROR: Unable to force delete any of the specified volumes.

Thank you.

edit flag offensive delete link more
0

answered 2015-03-20 15:12:34 -0600

updated 2015-03-20 15:17:25 -0600

I was in a similar situation running Openstack IceHouse. I created a test VM with a root volume and attempted to migrate to another cinder node. It turns out you can not migrate root volumes. This leaves the cinder volume in an error state with the migration status still set. To resolve the deletion issues I updated the field migration_status to NULL in the Cinder database.

mysql> use cinder;

mysql> UPDATE volumes set migration_status=NULL where id = $volume_id;

mysql> exit;

nova cinder delete $volume_id

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-07-16 06:35:48 -0600

Seen: 2,541 times

Last updated: Mar 20 '15