Bug 1749491
| Summary: | Cinder retype from non-type to new type on NFS deletes the Volume | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Alan Bishop <abishop> | |
| Component: | openstack-cinder | Assignee: | Alan Bishop <abishop> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tzach Shefi <tshefi> | |
| Severity: | urgent | Docs Contact: | Chuck Copello <ccopello> | |
| Priority: | high | |||
| Version: | 15.0 (Stein) | CC: | abishop, j.beisiegel, tshefi | |
| Target Milestone: | z3 | Keywords: | TestOnly, Triaged, ZStream | |
| Target Release: | 15.0 (Stein) | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | openstack-cinder-14.0.4-0.20200107100455.a59c01e.el8ost | Doc Type: | Bug Fix | |
| Doc Text: |
See doc text for https://bugzilla.redhat.com/show_bug.cgi?id=1740560
|
Story Points: | --- | |
| Clone Of: | 1740560 | |||
| : | 1749493 (view as bug list) | Environment: | ||
| Last Closed: | 2020-03-10 10:35:27 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1740560, 1749493, 1752560 | |||
|
Description
Alan Bishop
2019-09-05 18:19:06 UTC
Targeting for 15z3 to give QE time to verify the fix in OSP-15, though the patch will ship in 15z2. According to our records, this should be resolved by openstack-cinder-14.0.4-0.20200107100455.a59c01e.el8ost. This build is available now. Verified on:
openstack-cinder-14.0.4-0.20200107100455.a59c01e.el8ost
1. Create a "none" type volume:
(overcloud) [stack@undercloud-0 ~]$ cinder create 1
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2020-03-09T14:10:54.000000 |
| description | None |
| encrypted | False |
| id | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | controller-1@nfs#nfs | -> volume is NFS backed
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | f712a2330cc946cbb2a97de1c3ae4408 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2020-03-09T14:10:55.000000 |
| user_id | 269e4b3bcb764befb9183ff717b71204 | --> volume type is empty/not set.
| volume_type | None |
+--------------------------------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 9ae49b89-fb6c-4775-804e-0b5bf916619b | available | - | 1 | - | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
(overcloud) [stack@undercloud-0 ~]$ openstack volume type list
+--------------------------------------+---------+-----------+
| ID | Name | Is Public |
+--------------------------------------+---------+-----------+
| 9628c8d8-3429-45c0-a924-d7b70f18fdff | Legacy | True |
| 84450e60-f641-4807-8563-fb6f2e6dc459 | tripleo | True | -> default type, was disabled on cinder.conf.
+--------------------------------------+---------+-----------+
(overcloud) [stack@undercloud-0 ~]$ openstack volume set --retype-policy on-demand --type Legacy 9ae49b89-fb6c-4775-804e-0b5bf916619b
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 9798772d-f6ea-47f4-a3ac-bdba3b37d87a | available | - | 1 | Legacy | false | |
| 9ae49b89-fb6c-4775-804e-0b5bf916619b | retyping | - | 1 | - | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 9ae49b89-fb6c-4775-804e-0b5bf916619b | available | - | 1 | Legacy | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
(overcloud) [stack@undercloud-0 ~]$ cinder show 9ae49b89-fb6c-4775-804e-0b5bf916619b
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2020-03-09T14:10:54.000000 |
| description | None |
| encrypted | False |
| id | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
| metadata | |
| migration_status | success |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | controller-1@nfs#nfs | -> initial backend/type
| os-vol-mig-status-attr:migstat | success |
| os-vol-mig-status-attr:name_id | 9798772d-f6ea-47f4-a3ac-bdba3b37d87a |
| os-vol-tenant-attr:tenant_id | f712a2330cc946cbb2a97de1c3ae4408 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2020-03-09T14:21:30.000000 |
| user_id | 269e4b3bcb764befb9183ff717b71204 |
| volume_type | Legacy | -> Good its working as expected.
+--------------------------------+--------------------------------------+
When using NFS with two volumes types "none"\empty plus the second type "Legacy" also backed by NFS.
I was able to migrate from "none" to Legacy.
We are left in the end with a migrated copy.
Also this migrated volume is accessible
(overcloud) [stack@undercloud-0 ~]$ openstack volume snapshot create --volume 9ae49b89-fb6c-4775-804e-0b5bf916619b test-snap01
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| created_at | 2020-03-09T14:34:07.486870 |
| description | None |
| id | f4776ffc-a12c-448b-9d44-6231be75f9fd |
| name | test-snap01 |
| properties | |
| size | 1 |
| status | creating |
| updated_at | None |
| volume_id | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
+-------------+--------------------------------------+
The new volume is available:
(overcloud) [stack@undercloud-0 ~]$ cinder show 9ae49b89-fb6c-4775-804e-0b5bf916619b
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2020-03-09T14:10:54.000000 |
| description | None |
| encrypted | False |
| id | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
| metadata | |
| migration_status | success |
| multiattach | False |
| name | None |
| os-vol-host-attr:host | controller-1@nfs#nfs |
| os-vol-mig-status-attr:migstat | success |
| os-vol-mig-status-attr:name_id | 9798772d-f6ea-47f4-a3ac-bdba3b37d87a |
| os-vol-tenant-attr:tenant_id | f712a2330cc946cbb2a97de1c3ae4408 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2020-03-09T14:21:30.000000 |
| user_id | 269e4b3bcb764befb9183ff717b71204 |
| volume_type | Legacy |
+--------------------------------+--------------------------------------+
We can also successfully attach migrated volume to an instance:
(overcloud) [stack@undercloud-0 ~]$ nova volume-attach b60631a8-7ddf-4279-aa2c-3e84ff79086a 9ae49b89-fb6c-4775-804e-0b5bf916619b
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| device | /dev/vdc |
| id | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
| serverId | b60631a8-7ddf-4279-aa2c-3e84ff79086a |
| tag | - |
| volumeId | 9ae49b89-fb6c-4775-804e-0b5bf916619b |
+----------+--------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+--------------------------------------+
| 9ae49b89-fb6c-4775-804e-0b5bf916619b | in-use | - | 1 | Legacy | false | b60631a8-7ddf-4279-aa2c-3e84ff79086a |
|