manila create from snapid fails to inherit share type

Bug #1420369 reported by Tom Barron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Tom Barron

Bug Description

When one creates a manila share from a snapshot, the new share should have the same volume type as the original share on which the snapshot is based. However, the new share does not get the volume type unless it is explicitly specified.

Here is a log with upstream master as of 2015-02-10:

tbarron@ubuntu2:/opt/stack/manila$ manila create --name Share1 --share-network manila-share-net --volume-type Type1 NFS 1
+-------------------+--------------------------------------+
| Property | Value |
+-------------------+--------------------------------------+
| status | creating |
| description | None |
| availability_zone | nova |
| share_network_id | e045493f-b056-437a-9bb3-90aeebea16e9 |
| share_server_id | None |
| host | None |
| snapshot_id | None |
| id | c3b65861-f41a-4c0e-9efc-30bf72df2e74 |
| size | 1 |
| name | Share1 |
| created_at | 2015-02-10T08:57:50.017947 |
| export_location | None |
| share_proto | NFS |
| volume_type | 613d86ac-840c-4228-8dc8-dd38ecc5850e |
| project_id | 20d5a9c6523f4cd69d92ce9318cbc896 |
| metadata | {} |
+-------------------+--------------------------------------+
tbarron@ubuntu2:/opt/stack/manila$ manila list
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
| ID | Name | Size | Share Proto | Status | Volume Type | Export location | Host |
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
| c3b65861-f41a-4c0e-9efc-30bf72df2e74 | Share1 | 1 | NFS | available | Type1 | 10.0.0.2:/share_c3b65861_f41a_4c0e_9efc_30bf72df2e74 | ubuntu2@cmode_multi_svm#aggr_29122014_140846 |
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
tbarron@ubuntu2:/opt/stack/manila$ manila snapshot-create --name Snapshot1 Vol1
ERROR: No share with a name or ID of 'Vol1' exists.
tbarron@ubuntu2:/opt/stack/manila$ manila snapshot-create --name Snapshot1 Share1
+-----------------+------------------------------------------------------+
| Property | Value |
+-----------------+------------------------------------------------------+
| status | creating |
| share_id | c3b65861-f41a-4c0e-9efc-30bf72df2e74 |
| description | None |
| created_at | 2015-02-10T08:58:24.964558 |
| export_location | 10.0.0.2:/share_c3b65861_f41a_4c0e_9efc_30bf72df2e74 |
| share_proto | NFS |
| id | 8a0c4bf5-78e4-46e6-b950-26ae00e1d287 |
| size | 1 |
| share_size | 1 |
| name | Snapshot1 |
+-----------------+------------------------------------------------------+
tbarron@ubuntu2:/opt/stack/manila$ manila snapshot-list
+--------------------------------------+--------------------------------------+-----------+-----------+------------+
| ID | Share ID | Status | Name | Share Size |
+--------------------------------------+--------------------------------------+-----------+-----------+------------+
| 8a0c4bf5-78e4-46e6-b950-26ae00e1d287 | c3b65861-f41a-4c0e-9efc-30bf72df2e74 | available | Snapshot1 | 1 |
+--------------------------------------+--------------------------------------+-----------+-----------+------------+
tbarron@ubuntu2:/opt/stack/manila$ manila create --name Share2 --snapshot-id 8a0c4bf5-78e4-46e6-b950-26ae00e1d287 NFS 1
+-------------------+----------------------------------------------+
| Property | Value |
+-------------------+----------------------------------------------+
| status | creating |
| description | None |
| availability_zone | nova |
| share_network_id | e045493f-b056-437a-9bb3-90aeebea16e9 |
| share_server_id | None |
| host | ubuntu2@cmode_multi_svm#aggr_29122014_140846 |
| snapshot_id | 8a0c4bf5-78e4-46e6-b950-26ae00e1d287 |
| id | 5e65b949-ca1b-4f39-8f0f-626b73f5c362 |
| size | 1 |
| name | Share2 |
| created_at | 2015-02-10T08:59:05.000000 |
| export_location | None |
| share_proto | NFS |
| volume_type | None |
| project_id | 20d5a9c6523f4cd69d92ce9318cbc896 |
| metadata | {} |
+-------------------+----------------------------------------------+
tbarron@ubuntu2:/opt/stack/manila$ manila list
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
| ID | Name | Size | Share Proto | Status | Volume Type | Export location | Host |
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
| 5e65b949-ca1b-4f39-8f0f-626b73f5c362 | Share2 | 1 | NFS | available | None | 10.0.0.2:/share_5e65b949_ca1b_4f39_8f0f_626b73f5c362 | ubuntu2@cmode_multi_svm#aggr_29122014_140846 |
| c3b65861-f41a-4c0e-9efc-30bf72df2e74 | Share1 | 1 | NFS | available | Type1 | 10.0.0.2:/share_c3b65861_f41a_4c0e_9efc_30bf72df2e74 | ubuntu2@cmode_multi_svm#aggr_29122014_140846 |
+--------------------------------------+--------+------+-------------+-----------+-------------+------------------------------------------------------+----------------------------------------------+
tbarron@ubuntu2:/opt/stack/manila$

Tom Barron (tpb)
Changed in manila:
assignee: nobody → Tom Barron (tpb)
tags: added: cmode
tags: added: driver netapp
tags: removed: cmode driver netapp
Changed in manila:
importance: Undecided → Medium
milestone: none → kilo-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/169917

Changed in manila:
status: New → In Progress
Revision history for this message
Luis Pabón (lpabon) wrote :
Download full text (5.9 KiB)

I was able to reproduce it:
vagrant@vagrant-ubuntu-trusty-64:~$ manila list
+--------------------------------------+----------------------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------------------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type | Export location | Host |
+--------------------------------------+----------------------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------------------------------+
| 95263a8d-7a16-43dc-ab1b-f8f0bfa8e36e | cinder_vol_share_using_nfs | 1 | NFS | available | False | default | 10.254.0.3:/shares/share-95263a8d-7a16-43dc-ab1b-f8f0bfa8e36e | vagrant-ubuntu-trusty-64.localdomain@generic1#GENERIC1 |
+--------------------------------------+----------------------------+------+-------------+-----------+-----------+------------+---------------------------------------------------------------+--------------------------------------------------------+
vagrant@vagrant-ubuntu-trusty-64:~$ manila snapshot-create --name Snap1 cinder_vol_share_using_nfs
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| status | creating |
| share_id | 95263a8d-7a16-43dc-ab1b-f8f0bfa8e36e |
| name | Snap1 |
| created_at | 2015-04-01T21:09:53.572734 |
| share_proto | NFS |
| id | 8bc8e670-75a5-42ef-8fc3-4aeb5950dceb |
| size | 1 |
| share_size | 1 |
| description | None |
+-------------+--------------------------------------+
vagrant@vagrant-ubuntu-trusty-64:~$ manila snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------+------------+
| ID | Share ID | Status | Name | Share Size |
+--------------------------------------+--------------------------------------+-----------+-------+------------+
| 8bc8e670-75a5-42ef-8fc3-4aeb5950dceb | 95263a8d-7a16-43dc-ab1b-f8f0bfa8e36e | available | Snap1 | 1 |
+--------------------------------------+--------------------------------------+-----------+-------+------------+
vagrant@vagrant-ubuntu-trusty-64:~$ manila create --name Share2 --snapshot-id 8bc8e670-75a5-42ef-8fc3-4aeb5950dceb NFS 1
+-------------------+--------------------------------------------------------+
| Property | Value |
+-------------------+--------------------------------------------------------+
| status | creating |
| des...

Read more...

Revision history for this message
Luis Pabón (lpabon) wrote :

Verified fix:

vagrant@vagrant-ubuntu-trusty-64:~$ manila create --name Share3 --snapshot-id 8bc8e670-75a5-42ef-8fc3-4aeb5950dceb NFS 1
+-------------------+--------------------------------------------------------+
| Property | Value |
+-------------------+--------------------------------------------------------+
| status | creating |
| description | None |
| availability_zone | nova |
| share_network_id | 544d4d7f-c490-4d95-9118-97cc8038afd9 |
| export_locations | [] |
| host | vagrant-ubuntu-trusty-64.localdomain@generic1#GENERIC1 |
| snapshot_id | 8bc8e670-75a5-42ef-8fc3-4aeb5950dceb |
| is_public | False |
| id | bd4d8ed0-9ef3-463e-9217-22aa4bc3aa3f |
| size | 1 |
| name | Share3 |
| share_type | default |
| created_at | 2015-04-01T21:17:34.000000 |
| export_location | None |
| share_proto | NFS |
| project_id | 5f608d78ee9e4484bf8b8ffb7f1a414f |
| metadata | {} |
+-------------------+--------------------------------------------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/169917
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=ee1437009762deea5c5503f65fa997bc42a518a4
Submitter: Jenkins
Branch: master

commit ee1437009762deea5c5503f65fa997bc42a518a4
Author: Tom Barron <email address hidden>
Date: Tue Feb 10 05:02:07 2015 -0800

    Set share-type on share created from snapshot

    This commit ensures that when one creates a share from a snapshot
    the new share has the same share-type as the share on which the
    snapshot is based.

    Closes-bug: 1420369

    Change-Id: Icad04edd3eab6d40e56352a9a7d298b6efd80e93

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-rc1 → 2015.1.0
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.