Bug 1037449 - glanceclient: image-create fails with the flags --location / --copy-from with the --progress flag
Summary: glanceclient: image-create fails with the flags --location / --copy-from with...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-glanceclient
Version: 4.0
Hardware: Unspecified
OS: Linux
high
medium
Target Milestone: z4
: 4.0
Assignee: Jon Bernard
QA Contact: Yogev Rabl
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-03 08:09 UTC by Yogev Rabl
Modified: 2016-04-26 22:54 UTC (History)
11 users (show)

Fixed In Version: python-glanceclient-0.12.0-2.el6ost
Doc Type: Bug Fix
Doc Text:
Previously, when a user used parameters '--location' for URL of a remote image and the '--progress' flag with the glance command line client, an error occurred and the string data was printed out to the stdout. This was due to the glance client not supporting this combination of arguments. The glance client only shows a progress bar when creating an image from a local file. With this update, when a user requests a progress bar using the '--progress' flag, it checks to make sure that the image data is local. If not, the request for progress bar is ignored. As a result, the user can use the '--progress' flag for both the local and remote image sources, without an error output. Although, the progress bar is displayed only in the case of the local image sources.
Clone Of:
Environment:
Last Closed: 2014-05-29 19:57:09 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1259357 0 None None None Never
OpenStack gerrit 70396 0 None None None Never
Red Hat Product Errata RHBA-2014:0577 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform 4 Bug Fix and Enhancement Advisory 2014-05-29 23:55:40 UTC

Description Yogev Rabl 2013-12-03 08:09:27 UTC
Description of problem:
When verifying the RFE: https://bugzilla.redhat.com/show_bug.cgi?id=919816 the image-create action failed when trying to create an image with an image should download from a web resource. 

for an example: 
glance image-create --name Fedora17-image --disk-format=qcow2 --container-format=bare --is-public=True --location http://download.lab.bos.redhat.com/composes/latest-RHEL6/6.5/Server/x86_64/iso/RHEL6.5-20131009.0-Server-x86_64-DVD1.iso --progress

'data'

The output is informative and there's no trace of the action in the log. 

Version-Release number of selected component (if applicable):
python-glanceclient-0.10.0-1.el6ost.noarch
python-glance-2013.2-3.el6ost.noarch
openstack-glance-2013.2-3.el6ost.noarch


How reproducible:
evevry time

Steps to Reproduce:
1. Run the command:  glance image-create --name Fedora17-image --disk-format=qcow2 --container-format=bare --is-public=True --location http://download.lab.bos.redhat.com/composes/latest-RHEL6/6.5/Server/x86_64/iso/RHEL6.5-20131009.0-Server-x86_64-DVD1.iso --progress


Actual results:
A new line with the output 'data'.

Expected results:
if the action fails then an error output to the console and log. But the action should succeed. 

Additional info:

Comment 3 Flavio Percoco 2014-01-07 13:07:24 UTC
Closing since there's not enough info to debug this. Please, provide more info along with the bug report (CLI / Server debug output).

Feel free to file it if it's still valid and you've more info about the actual error.

Thanks!

Comment 4 Tzach Shefi 2014-01-22 14:23:46 UTC
Reopned as it's 100% reproducible. 

Semi dist setup
openstack-glance-2013.2.1-3.el6ost.noarch

Using --location or --copy file with --progress -> no image created, only get 'data' on cli prompt.

Comment 5 Flavio Percoco 2014-01-22 16:34:46 UTC
Thanks Tzach for re-opening and the access to the test environment. That was helpful.

This is a glanceclient bug. The `--progress` flag tries to get the data from the parsed CLI fields but there's not such a field there.

http://git.openstack.org/cgit/openstack/python-glanceclient/tree/glanceclient/v1/shell.py#n229

Comment 7 Jon Bernard 2014-03-03 19:34:35 UTC
Patch was merged upstream, backport is needed.

Comment 15 Jon Bernard 2014-04-15 20:53:28 UTC
Patch was merged internally, but a build was needed before the deadline.  We could ask Lon for an exception but I don't think this bug is important enough for that.  Pushing to A5.

Comment 17 Yogev Rabl 2014-04-27 10:56:10 UTC
verified on version: 
python-glanceclient-0.12.0-2.el6ost.noarch
python-glance-2013.2.3-2.el6ost.noarch
openstack-glance-2013.2.3-2.el6ost.noarch

Comment 19 errata-xmlrpc 2014-05-29 19:57:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0577.html


Note You need to log in before you can comment on or make changes to this bug.