Migrating an attached volume to other AZ leaves original volume intact.

Bug #1802919 reported by Tzach Shefi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

Description of problem:

Version-Release number of selected component (if applicable):
puppet-cinder-13.3.1-0.20181013114719.25b1ba3.el7ost.noarch
python2-os-brick-2.5.3-0.20180816081254.641337b.el7ost.noarch
openstack-cinder-13.0.1-0.20181013185427.31ff628.el7ost.noarch
python2-cinderclient-4.0.1-0.20180809133302.460229c.el7ost.noarch
python-cinder-13.0.1-0.20181013185427.31ff628.el7ost.noarch

How reproducible:
Unsure

Steps to Reproduce:
1. Boot an instance (AZ=nova)
2. Create a triple0 (lvm AZ=nova) volume
cinder create 1 --volume-type tripleo --availability-zone nova --name vol-lvm2
+--------------------------------+---------------------------------------+
| Property | Value |
+--------------------------------+---------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2018-11-12T11:40:30.000000 |
| description | None |
| encrypted | False |
| id | 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | vol-lvm2 |
| os-vol-host-attr:host | hostgroup@tripleo_iscsi#tripleo_iscsi |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 50bc97ff576b4a60b81eca7830eee529 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2018-11-12T11:40:31.000000 |
| user_id | 1015400afd2f4c429bb2241282b297c9 |
| volume_type | tripleo |
+--------------------------------+---------------------------------------+

3. Attach vol to instance
nova volume-attach 2d300b8d-8805-4677-a9e0-bf33386963a7 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f auto
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdb |
| id | 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
| serverId | 2d300b8d-8805-4677-a9e0-bf33386963a7 |
| volumeId | 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
+----------+--------------------------------------+

Vol get's attached:
| 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f | in-use | vol-lvm2 | 1 | tripleo | false | 2d300b8d-8805-4677-a9e0-bf33386963a7

4. Migrate to nfs (otherAZ)
cinder migrate 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f controller-0@nfs
Request to migrate volume 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f has been accepted.

5. Migration works, new nfs vol is in use, but source vol remains available.

cinder list
+--------------------------------------+-----------+----------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+----------+------+-------------+----------+--------------------------------------+
| 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f | available | vol-lvm2 | 1 | tripleo | false | |

| 73ed2a59-a0cf-4110-9b9f-091c1cb24b29 | in-use | vol-lvm2 | 1 | tripleo | false | 2d300b8d-8805-4677-a9e0-bf33386963a7 |

Details of volumes:
Source tripl0 lvm vol:
cinder show 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f
+--------------------------------+---------------------------------------+
| Property | Value |
+--------------------------------+---------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2018-11-12T11:40:30.000000 |
| description | None |
| encrypted | False |
| id | 23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
| metadata | |
| migration_status | migrating |
| multiattach | False |
| name | vol-lvm2 |
| os-vol-host-attr:host | hostgroup@tripleo_iscsi#tripleo_iscsi |
| os-vol-mig-status-attr:migstat | migrating |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 50bc97ff576b4a60b81eca7830eee529 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2018-11-12T11:43:21.000000 |
| user_id | 1015400afd2f4c429bb2241282b297c9 |
| volume_type | tripleo |
+--------------------------------+---------------------------------------+

Target nfs volume
cinder show 73ed2a59-a0cf-4110-9b9f-091c1cb24b29
+--------------------------------+---------------------------------------------+
| Property | Value |
+--------------------------------+---------------------------------------------+
| attached_servers | ['2d300b8d-8805-4677-a9e0-bf33386963a7'] |
| attachment_ids | ['f1eaed7a-81ec-4e3e-90d6-7cc9ac96088f'] |
| availability_zone | dc2 |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2018-11-12T11:40:30.000000 |
| description | None |
| encrypted | False |
| id | 73ed2a59-a0cf-4110-9b9f-091c1cb24b29 |
| metadata | |
| migration_status | target:23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
| multiattach | False |
| name | vol-lvm2 |
| os-vol-host-attr:host | controller-0@nfs#nfs |
| os-vol-mig-status-attr:migstat | target:23ecbc2a-8942-4ebf-92fe-5ac9d781f74f |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 50bc97ff576b4a60b81eca7830eee529 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | in-use |
| updated_at | 2018-11-12T11:43:16.000000 |
| user_id | 1015400afd2f4c429bb2241282b297c9 |
| volume_type | tripleo |
+--------------------------------+---------------------------------------------+

Actual results:
Volume is migrated\attached, but original volume remains available.
If I do migrate an unattached volume, source volume gets deleted as expected.

Expected results:
Expect source volume to get deleted, as happens with migrate of a none attached volume.

Additional info:
Not sure this might be an OS-brick issue.
Another tip notice triple0 (lvm) backend's volume_backend_name={} is empty maybe this is related in some odd way. A none attached volume worked fine back and forth same LVM\NFS backends.

Revision history for this message
Tzach Shefi (tshefi) wrote :
Revision history for this message
Matthew Booth (mbooth-9) wrote :

This is Nova bug 1803961

Revision history for this message
Yikun Jiang (yikunkero) wrote :
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.