Create cloned volume with volume_type failed when source volume_type is None.

Bug #1589349 reported by huyang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Medium
Brin Zhang

Bug Description

Steps:
1. Create a source volume without volume_type.
2. Create volume with volume_type from the source volume.
3. Create cloned volume failed.

such as,

root@ubuntu-xx:~# cinder list
+--------------------------------------+-----------+------------+------+--------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------+------+--------------+----------+-------------+
| d9ea8a2f-9294-4dc3-a906-fd9ab4ededb3 | available | test_iscsi | 1 | - | false | |
+--------------------------------------+-----------+------------+------+--------------+----------+-------------+
root@ubuntu-xx:~# cinder create --volume-type cd743287-db88-4ba3-8503-b58c64e78dcb --source-volid d9ea8a2f-9294-4dc3-a906-fd9ab4ededb3 1
ERROR: Invalid volume type: id cannot be None (HTTP 400) (Request-ID: req-31fa0411-f188-4738-8512-5533d1691e8e)

It's same with "Create volume from snapshot".

huyang (huyang1)
Changed in cinder:
assignee: nobody → huyang (huyang1)
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/325714

Changed in cinder:
status: New → In Progress
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
Cao ShuFeng (caosf-fnst) wrote :

Hi, huyang:
   I don't known how to reproduce this bug in the fist step.
>Steps:
>1. Create a source volume without volume_type.
>2. Create volume with volume_type from the source volume.
>3. Create cloned volume failed.

How to create a volume *without* volume_type?
When I use "cinder create 1" I will get a volume in a "default" volume_type.

$ cinder create 1
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2016-06-06T09:55:57.000000 |
| description | None |
| encrypted | False |
| id | 0e48452c-7033-4d71-a86b-ad33cc74f008 |
| 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 | 1e2f6b0fb0dc4e3690b263adc14f0698 |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | 6f54578d22d4489b80d483c0359933d9 |
| volume_type | lvmdriver-1 |
+--------------------------------+--------------------------------------+

Thanks

Revision history for this message
Cao ShuFeng (caosf-fnst) wrote :

Hi, huyang:
    Ok, I get it.
    Firstly, we need to delete all volume_types.
    Then we can create a volume with no volume type. :)

Thanks

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by huyang (<email address hidden>) on branch: master
Review: https://review.openstack.org/325714
Reason: LisaLi already have a patch https://review.openstack.org/#/c/308148/ which tries to solve the problem.

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

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: huyang (huyang1) → nobody
information type: Public → Public Security
Revision history for this message
Jeremy Stanley (fungi) wrote :

When setting a bug to Private Security or Public Security (indicating it's a suspected security vulnerability), you need to at least add a comment explaining why you believe that may be the case. I'm setting this back to a regular public bug report for now, on the assumption it was switched to Public Security by mistake.

information type: Public Security → Public
Changed in cinder:
status: In Progress → New
Brin Zhang (zhangbailin)
Changed in cinder:
assignee: nobody → zhangbailin (zhangbailin)
Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/535712
Reason: No updates for quite awhile. Feel free to restore and update if you wish to continue with this.

Revision history for this message
Vishakha Agarwal (vishakha.agarwal) wrote :

Hi,

is anyone working on this as i'm willing to take this bug?

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/850618

Revision history for this message
Vladislav Belogrudov (vlad-belogrudov) wrote :

not sure how to get into this situation, I cannot get rid of default volume type with devstack. At least one type has to be present and has to be default

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.