Can't create volume from volume

Bug #1599225 reported by Sofiia Andriichenko
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Justin A Wilson
OpenStack Dashboard (Horizon)
Fix Released
Low
Vadym Markov

Bug Description

Steps to reproduce:
 1. Navigate to horison as admin
 2. Navigate to tab Compute->Volumes
 3. Click button "Create Volume"
 4. On the opened window in textbox "Volume Name" enter "Volume1" and click button "Create Volume".
 5. After volume is created click button "Create Volume"
 6. In textbox "Volume Name" enter "Volume2"
 7. Choose "Type" as "volumes_ceph"
 8. Choose "Volume Source" as "Volume"
 9. Choose "Use a volume as source" as "Volume1"
 10. Click button "Create Volume"

Expected results:
Volume is created

Actual result:
Volume isn't created. Error "Error: Unable to create volume."

Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :
Changed in cinder:
status: New → Confirmed
summary: - Can't create volume from volum
+ Can't create volume from volume
Revision history for this message
Eric Harney (eharney) wrote :

We will need logs from the cinder scheduler and volume services to address this.

Changed in cinder:
status: Confirmed → Incomplete
Revision history for this message
Justin A Wilson (justin-wilson) wrote :

I performed the last step via the command-line with debug enabled and got the following output:

ERROR: Invalid input received: Invalid volume_type provided: 0aa9f129-41b5-449e-b508-e6824203b513 (requested type is not compatible; either match source volume, or omit type argument). (HTTP 400) (Request-ID: req-9925c651-df49-4215-97cf-ae784c07c613)

I don't think this is a bug, but the user should best given a more descriptive error message when using the Horizon interface. I do think Cinder should support creating a volume from another volume of a different type. Could this kind of support be added a feature?

Revision history for this message
Sofiia Andriichenko (sandriichenko) wrote :

Logs: http://www.ex.ua/414409966969
But I didn't find any notation in cinder logs about this bug.

Changed in cinder:
status: Incomplete → Confirmed
Changed in cinder:
assignee: nobody → Justin A Wilson (justin-wilson)
Revision history for this message
Justin A Wilson (justin-wilson) wrote :

This is not really a bug, but a limitation of Cinder itself. If you look at the source for the volume api (cinder/volume/api.py), starting at line 250, you will see that it checks to see if the volume type ids match. If they do not match, then it raises an exception.

Changed in cinder:
status: Confirmed → Invalid
Revision history for this message
gregor bregenzer (bregenzer) wrote :

The problem is: if volume source "volume" is selected, then there is no dropdown to set the volume type (i think it is not needed, because it should choose the same backend as the source volume automatically).

Now the first volume type available will be used as volume type, and if it's not the desired one, you get a HTTP 400 in cinder-api already.

Workaround for now via dashboard: first choose the volume type, then select volume source "volume" and the source volume.

Changed in horizon:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Gary W. Smith (gary-w-smith)
tags: added: low-hanging-fruit
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Review: https://review.openstack.org/505377
Reason: This review is > 4 months without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in horizon:
assignee: Gary W. Smith (gary-w-smith) → Vadym Markov (vmarkov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/661999
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=c60a82dfaa552bfe7840e61521fdc4a8625b1882
Submitter: Zuul
Branch: master

commit c60a82dfaa552bfe7840e61521fdc4a8625b1882
Author: BubaVV <email address hidden>
Date: Mon May 27 14:51:42 2019 +0300

    Fixes creating nondefault type volumes from volume

    Horizon ignores volume type of source volume and tries to set default
    type to newly created volume. Proposed patch makes Horizon inherit
    volume type from the source

    Closes-bug: #1830759
    Closes-bug: #1599225
    Change-Id: Ice18259a59d1b7e347ffab89ca931985d49e6895

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 16.0.0.0b2

This issue was fixed in the openstack/horizon 16.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.