Bug 1004453

Summary: glance: help for --location and copy-from on image are incorrect
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-glanceclientAssignee: Jakub Ruzicka <jruzicka>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: eglynn, fpercoco, hateya, jruzicka, yeylon
Target Milestone: ---   
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-04 18:21:05 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 Dafna Ron 2013-09-04 16:25:02 UTC
Description of problem:

we cannot edit location for image unless its in queued status. 
the help file does not specify that: 

 --location <IMAGE_URL>
                        URL where the data for this image already resides. For
                        example, if the image data is stored in swift, you
                        could specify

--copy-from <IMAGE_URL>
                        Similar to '--location' in usage, but this indicates
                        that the Glance server should immediately copy the
                        data and store it in its configured image store.

[root@opens-vdsb ~(keystone_admin)]# glance image-update dc79349e-de25-4ec5-8b12-5a6145270c47 --location http://download.eng.tlv.redhat.com/rel-eng/RHEL6.4-20130130.0/6/Appliance/rhel-server-x86_64-kvm-6.4_20130130.0-2-sda.qcow2
Request returned failure status.
400 Bad Request
Attempted to update Location field for an image not in queued status.
    (HTTP 400)
[root@opens-vdsb ~(keystone_admin)]# glance image-update dc79349e-de25-4ec5-8b12-5a6145270c47 --copy-from http://download.eng.tlv.redhat.com/rel-eng/RHEL6.4-20130130.0/6/Appliance/rhel-server-x86_64-kvm-6.4_20130130.0-2-sda.qcow2
Request returned failure status.
400 Bad Request
Attempted to update Location field for an image not in queued status.
    (HTTP 400)


Version-Release number of selected component (if applicable):

openstack-glance-2013.1.3-1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. create an image 
2. try to update the image location using --location or --copy-from 
3.

Actual results:

we fail because image is not in queued status.

Expected results:

help file should be fixed. it looks like it was copied as is from create-image help 

Additional info:

https://bugs.launchpad.net/glance/+bug/1220809

Comment 1 Jakub Ruzicka 2013-11-04 18:21:05 UTC
Help isn't incorrect but incomplete. After using this on image in wrong state (not queued) you get sane explanation why.

No need to track this upstream RFE here.