Bug 1149599

Summary: Cinder create volume --image-id doesn't support image name
Product: Red Hat OpenStack Reporter: Tzach Shefi <tshefi>
Component: python-cinderclientAssignee: Eric Harney <eharney>
Status: CLOSED CURRENTRELEASE QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0 (RHEL 7)CC: eharney, jruzicka, juwu, sclewis, scohen, sgotliv, slong, yeylon
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
With this feature, you can now use Block Storage (cinder) to create a volume by specifying either the image ID or image name.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-30 14:31:27 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:

Description Tzach Shefi 2014-10-06 07:53:53 UTC
Description of problem: When using Cinder create volume 1 --image-id, only image-id is an acceptable value, why can't I not use image-name?
Of course only if my image-list doesn't include duplicate names..

Why is this supported during volume delete for example but not during volume create?

cinder help delete
usage: cinder delete <volume> [<volume> ...]
Remove volume(s).
Positional arguments:
  <volume> Name or ID of the volume(s) to delete. -> Notice "Name or ID.."


Version-Release number of selected component (if applicable):
RHEL7
python-cinderclient-1.0.9-1.el6ost.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Upload an image to glance 
2. Cinder create volume 1 --image-id  "image-name" 
3.

Actual results:

Glance image list has only image called "tshefi1 "

[root@puma51 ~(keystone_admin)]# cinder create 1 --display-name tshefi1 --image-id tshefi-cirrosnap
ERROR: Invalid imageRef provided. (HTTP 400) (Request-ID: req-c964660a-08ad-40e5-8565-0e5558e4c5db)



Expected results:
If we don't have duplicate image names, this command should successfully complete without errors.

Comment 1 Sergey Gotliv 2015-01-15 12:56:06 UTC
The fix should be a part of the RHOS 6.0 release.

Comment 3 Lon Hohberger 2015-01-29 17:02:31 UTC
This isn't actually in the RHEL OSP 6 release.

Comment 6 Sergey Gotliv 2015-04-15 13:56:17 UTC
Sean,

The upstream patch is merged but will be released only in Kilo, therefore it will be a part of RHOS 7.0. I don't think its a z-stream material, I suggest to push it to 7.0, thoughts?

Comment 7 Sean Cohen 2015-04-15 14:08:21 UTC
(In reply to Sergey Gotliv from comment #6)
> Sean,
> 
> The upstream patch is merged but will be released only in Kilo, therefore it
> will be a part of RHOS 7.0. I don't think its a z-stream material, I suggest
> to push it to 7.0, thoughts?

Acked, setting the target accordingly,
Sean

Comment 11 Eric Harney 2015-10-09 18:57:42 UTC
This is in the Liberty client upstream.  I agree with comment #6 about this not really being z-stream material (just an ease-of-use enhancement).  We should leave this for 8.0 unless there's really a strong need for it.

Comment 12 Sergey Gotliv 2015-11-30 14:31:27 UTC
I agree with comment #11, this is a nice enhancement but definitely not a z-stream material. You can use image id not image name in 7.0. Re-targeting an close for 8.0.