Bug 985477

Summary: [RFE] [cinder] Export / import volumes
Product: Red Hat OpenStack Reporter: Eric Harney <eharney>
Component: openstack-cinderAssignee: Eric Harney <eharney>
Status: CLOSED ERRATA QA Contact: Yogev Rabl <yrabl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: ddomingo, dron, egafford, eharney, jschluet, lkuchlan, nlevinki, pgrist, sclewis, scohen, sgordon
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/cinder/+spec/add-export-import-volumes
Whiteboard: upstream_milestone_none upstream_status_implemented upstream_definition_approved
Fixed In Version: openstack-cinder-9.0.0-0.20160726055155.53ac615.el7ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 15:25:37 UTC Type: Bug
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: 988535    

Description Eric Harney 2013-07-17 15:09:50 UTC
It would be useful to add the ability to export/import volumes from one cinder node to another. This would specifically focus on cases such as a single backend connected to multiple cinder setups. A volume could be exported from cinder-node-a (removed from that cinder install without being deleted) and imported in to cinder-node-b (volume/data is imported and DB is populated appropriately).


https://blueprints.launchpad.net/cinder/+spec/add-export-import-volumes

Comment 2 Scott Lewis 2013-08-01 17:39:27 UTC
Matched priority to upstream.

Comment 4 Eric Harney 2013-08-22 14:11:31 UTC
Not implemented in Havana.

Comment 9 Eric Harney 2014-07-23 14:32:31 UTC
This is supported for the LVM driver already, in 5.0.

Comment 13 Mike McCune 2016-03-28 22:33:16 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 15 lkuchlan 2016-10-06 07:27:32 UTC
Tested using:
python-cinderclient-1.9.0-0.20160902095023.e15d8e7.el7ost.noarch
python-cinder-9.0.0-0.20160907194411.4057701.el7ost.noarch
puppet-cinder-9.2.0-0.20160901081001.f657f9b.el7ost.noarch
openstack-cinder-9.0.0-0.20160907194411.4057701.el7ost.noarch

Tested according to the following test-plan: 
https://polarion.engineering.redhat.com/polarion/#/project/RHELOpenStackPlatform/wiki/Cinder/RFE_985477-Export%20_%20Import%20Volumes


Verification flow:

[stack@undercloud-0 ~]$ cinder create 1
+--------------------------------+--------------------------------------+
| Property                       | Value                                |
+--------------------------------+--------------------------------------+
| attachments                    | []                                   |
| availability_zone              | nova                                 |
| bootable                       | false                                |
| consistencygroup_id            | None                                 |
| created_at                     | 2016-09-29T08:40:08.000000           |
| description                    | None                                 |
| encrypted                      | False                                |
| id                             | 853f7632-90ef-4811-bbf5-9cdfb20f6cf5 |
| metadata                       | {}                                   |
| migration_status               | None                                 |
| multiattach                    | False                                |
| name                           | None                                 |
| os-vol-host-attr:host          | None                                 |
| os-vol-mig-status-attr:migstat | None                                 |
| os-vol-mig-status-attr:name_id | None                                 |
| os-vol-tenant-attr:tenant_id   | 74b9b3d55c484f209b59fb48aef13628     |
| replication_status             | disabled                             |
| size                           | 1                                    |
| snapshot_id                    | None                                 |
| source_volid                   | None                                 |
| status                         | creating                             |
| updated_at                     | None                                 |
| user_id                        | 21646731d787446f81b45071dd5dc556     |
| volume_type                    | None                                 |
+--------------------------------+--------------------------------------+
[stack@undercloud-0 ~]$ cinder show 853f7632-90ef-4811-bbf5-9cdfb20f6cf5
+--------------------------------+---------------------------------------+
| Property                       | Value                                 |
+--------------------------------+---------------------------------------+
| attachments                    | []                                    |
| availability_zone              | nova                                  |
| bootable                       | false                                 |
| consistencygroup_id            | None                                  |
| created_at                     | 2016-09-29T08:40:08.000000            |
| description                    | None                                  |
| encrypted                      | False                                 |
| id                             | 853f7632-90ef-4811-bbf5-9cdfb20f6cf5  |
| metadata                       | {}                                    |
| migration_status               | None                                  |
| multiattach                    | False                                 |
| name                           | None                                  |
| 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   | 74b9b3d55c484f209b59fb48aef13628      |
| replication_status             | disabled                              |
| size                           | 1                                     |
| snapshot_id                    | None                                  |
| source_volid                   | None                                  |
| status                         | available                             |
| updated_at                     | 2016-09-29T08:40:11.000000            |
| user_id                        | 21646731d787446f81b45071dd5dc556      |
| volume_type                    | None                                  |
+--------------------------------+---------------------------------------+
[stack@undercloud-0 ~]$ cinder unmanage 853f7632-90ef-4811-bbf5-9cdfb20f6cf5
[stack@undercloud-0 ~]$ cinder list
+----+--------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+----+--------+------+------+-------------+----------+-------------+
+----+--------+------+------+-------------+----------+-------------+
[stack@undercloud-0 ~]$ cinder manage hostgroup@tripleo_iscsi#tripleo_iscsi volume-853f7632-90ef-4811-bbf5-9cdfb20f6cf5 --name vol1
+--------------------------------+---------------------------------------+
| Property                       | Value                                 |
+--------------------------------+---------------------------------------+
| attachments                    | []                                    |
| availability_zone              | nova                                  |
| bootable                       | false                                 |
| consistencygroup_id            | None                                  |
| created_at                     | 2016-09-29T08:41:18.000000            |
| description                    | None                                  |
| encrypted                      | False                                 |
| id                             | f36348ad-c48d-4305-84e9-99fc5e164a87  |
| metadata                       | {}                                    |
| migration_status               | None                                  |
| multiattach                    | False                                 |
| name                           | vol1                                  |
| 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   | 74b9b3d55c484f209b59fb48aef13628      |
| replication_status             | None                                  |
| size                           | 0                                     |
| snapshot_id                    | None                                  |
| source_volid                   | None                                  |
| status                         | creating                              |
| updated_at                     | None                                  |
| user_id                        | 21646731d787446f81b45071dd5dc556      |
| volume_type                    | None                                  |
+--------------------------------+---------------------------------------+
[stack@undercloud-0 ~]$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID                                   | Status    | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| f36348ad-c48d-4305-84e9-99fc5e164a87 | available | vol1 | 1    | -           | false    |             |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+

Comment 18 errata-xmlrpc 2016-12-14 15:25:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html