VMware: vmdk driver should check the extra-spec value

Bug #1288254 reported by Pavan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Vipin Balachandran

Bug Description

1. Create volume type of thick/thin/eagerzeroedthick , these are the types vmware supports.
2. Set the vmware extra specs to the volume type created in step1.
3. While doing step 2, instead of passing the valid types in the extra spec list [i.e, thin, thick, or eagerZeroedThick], pass any argument here, the command is successful.
As vmware does not support other than above mentioned types in the extra spec list, this should be handled and thrown error.

$ cinder type-key ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 set vmware:vmdk_type=thi23
$ cinder type-list
+--------------------------------------+-------+
| ID | Name |
+--------------------------------------+-------+
| 93fec469-4ed6-41f5-9add-db09ef926a54 | thin |
| ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 | thick |
+--------------------------------------+-------+
$ cinder type-key ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 set vmware:vmdk_type=thi23

$ cinder extra-specs-list
+--------------------------------------+-------+----------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+-------+----------------------------------+
| 93fec469-4ed6-41f5-9add-db09ef926a54 | thin | {u'vmware:vmdk_type': u'tin123'} |
| ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 | thick | {u'vmware:vmdk_type': u'thi23'} | -->
there is no check here for the vmdk_type,
+--------------------------------------+-------+----------------------------------+

Thanks
Pavan

Tags: drivers vmware
Changed in cinder:
assignee: nobody → Vipin Balachandran (vbala)
Changed in cinder:
importance: Undecided → Medium
status: New → Confirmed
tags: added: vmdk
Revision history for this message
Pavan (pavan-dp) wrote :

Similar behavior observed for type clone also.
vmware supports clone types : full and linked, where as i can add full1 , linked123 to the extra spec list

subbu@devstack-controller:~/devstack$ cinder extra-specs-list
+--------------------------------------+-------------+--------------------------------------+
| ID | Name | extra_specs |
+--------------------------------------+-------------+--------------------------------------+
| 39d06839-d87c-462b-bdb7-a2ebf3303c8e | full_clone1 | {u'vmware:clone_type': u'full1'} |
| 3f397d83-7fbe-446f-b520-5f1bab519129 | link_clone | {u'vmware:clone_type': u'linked123'} |
| 5de1c9b5-3d06-4fb8-aaf9-5c634392f8fd | full_clone | {u'vmware:clone_type': u'full'} |
| 93fec469-4ed6-41f5-9add-db09ef926a54 | thin | {u'vmware:vmdk_type': u'tin123'} |
| a7ccc6d9-1eb5-4fad-841f-7e66eaaec0b0 | fast_clone1 | {u'vmware:clone_type': u'linked'} |
| ef9e6393-0aa7-4e0c-a9c9-86e3e61c3642 | thick | {u'vmware:vmdk_type': u'thi23'} |
+--------------------------------------+-------------+--------------------------------------+

Changed in cinder:
importance: Medium → Low
tags: removed: vmdk
summary: - vmware cinder driver should check the extra-spec value
+ VMware: vmdk driver should check the extra-spec value
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/113863
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=86591a24d48fe19be427b5a8981821fcdb85bb37
Submitter: Jenkins
Branch: master

commit 86591a24d48fe19be427b5a8981821fcdb85bb37
Author: Vipin Balachandran <email address hidden>
Date: Fri Aug 8 18:20:51 2014 +0530

    VMware: Implement retype for VMDK driver

    This patch adds support for retype operation in the VMDK driver.

    The VMDK driver uses the extra spec keys 'vmware:vmdk_type' and
    'vmware:storage_profile' to determine the disk provisioning type
    and storage policy of the backing VM. Currently it is not possible
    to change the disk provisioning type or storage policy after volume
    creation. With retype support, user can change the disk provisioning
    type and storage policy by changing the volume's type to another type
    with extra spec keys set to desired values.

    Closes-Bug: #1275682
    Partial-Bug: #1288254

    Change-Id: If4b868af7b91373b2b36fd5cd2f0dda12d604d99

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Automatically unassigning due to inactivity.

Changed in cinder:
assignee: Vipin Balachandran (vbala) → nobody
status: In Progress → Triaged
Changed in cinder:
assignee: nobody → Vipin Balachandran (vbala)
Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/249735
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9cccebbc82fcb42195e1fd1822f01422f1fd565e
Submitter: Jenkins
Branch: master

commit 9cccebbc82fcb42195e1fd1822f01422f1fd565e
Author: Vipin Balachandran <email address hidden>
Date: Wed Nov 25 17:36:21 2015 +0530

    VMware: Validate extra spec opt vmware:clone_type

    This patch validates the value of extra spec option 'vmware:clone_type'.
    It raises an exception if the value is invalid.

    Change-Id: Idab59a090184e1ea1446e9e9ed18c753d5c803cc
    Closes-Bug: #1288254

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 8.0.0.0b1

This issue was fixed in the openstack/cinder 8.0.0.0b1 development milestone.

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
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.