Bug 1383228 - [OSP6] [Backport] Glance image-download .. --progress fails: object of type 'generator' has no len()
Summary: [OSP6] [Backport] Glance image-download .. --progress fails: object of type ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-glanceclient
Version: 6.0 (Juno)
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
: 6.0 (Juno)
Assignee: Cyril Roelandt
QA Contact: nlevinki
URL:
Whiteboard:
Depends On: 1186176
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-10 08:56 UTC by Ondrej
Modified: 2020-04-15 14:43 UTC (History)
12 users (show)

Fixed In Version: python-glanceclient-0.14.2-6.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1186176
Environment:
Last Closed: 2017-02-15 13:50:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1384664 0 None None None 2016-10-10 08:56:59 UTC
Launchpad 1414954 0 None None None 2016-10-10 08:56:59 UTC
Red Hat Product Errata RHBA-2017:0278 0 normal SHIPPED_LIVE openstack-glance bug fix advisory 2017-02-15 18:49:09 UTC

Description Ondrej 2016-10-10 08:56:59 UTC
+++ This bug was initially created as a clone of Bug #1186176 +++
Hi,
the bug was fixed in OSP-7, is it possible to backport the fix to OSP-6?

Package versions:

python-glance-2014.2.3-4.el7ost.noarch
python-glanceclient-0.14.2-5.el7ost.noarch
python-glance-store-0.1.10-6.el7ost.noarch
openstack-glance-2014.2.3-4.el7ost.noarch

Thanks,
Ondrej

Description of problem: When downloading a glance image while adding --progress  I get an error:
object of type 'generator' has no len() 

Same command without --progress works fine.  

Version-Release number of selected component (if applicable):
rhel7
python-glance-2014.2.1-2.el7ost.noarch
python-glanceclient-0.14.2-1.el7ost.noarch
python-glance-store-0.1.8-1.el7ost.noarch
openstack-glance-2014.2.1-2.el7ost.noarch

On Icehouse ( python-glanceclient-0.13.1-1.el7ost.noarch 
) it works fine, just checked it now.  

How reproducible:
Every time, on two separate deployments 

Steps to Reproduce:
1. Upload image to glance
2. glance image-download <imageID> --file test.raw --progress - fails 
3. Do same without --progress works fine.

4. Also tested with a snapshot of an instance as source same error.  

Actual results:
# glance image-download c3d3f.... --file cirros2.raw --progress
object of type 'generator' has no len()  

Expected results:
File should download without error and with progress bar indicator

Additional info:
--debug info: 

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 602, in main
    args.func(client, args)                                                       
  File "/usr/lib/python2.7/site-packages/glanceclient/v1/shell.py", line 151, in do_image_download
    body = progressbar.VerboseIteratorWrapper(body, len(body))                                    
TypeError: object of type 'generator' has no len()                                                
object of type 'generator' has no len()

--- Additional comment from Flavio Percoco on 2015-01-27 10:12:13 EST ---

This seems to have been fixed upstream. No need to track it here.

Comment 5 errata-xmlrpc 2017-02-15 13:50:14 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.

https://rhn.redhat.com/errata/RHBA-2017-0278.html


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