Fix TypeError when downloading an image

Bug #1880827 reported by wangyu
This bug affects 2 people
Affects Status Importance Assigned to Milestone
In Progress
Glance Client

Bug Description

There were two patches to fix TypeError when downloading an image[1][2],but It seems that this problem still exists.


The glance documentation states that None (empty image) is a valid return value. We have to handle this.

However, has a decorator: glanceclient.common.utils.add_req_id_to_object().
When cinder uses, return value: image_chunks is <class 'glanceclient.common.utils.RequestIdProxy'> which has two propertys. It follows:
RequestIdProxy.request_ids: request-id
RequestIdProxy.wrapped: An iterable body or None

So image_chunks can not be None at any time, it need to be fixed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master

Changed in cinder:
assignee: nobody → wangyu (wangzhongyu)
status: New → In Progress
Revision history for this message
Mark Goddard (mgoddard) wrote :

Also hitting this in Train with glanceclient 2.17.0. My particular scenario is that I'm trying to use a file-backed image, but the default store in glance was switched to ceph.

Changed in python-glanceclient:
status: New → Confirmed
Revision history for this message
Mark Goddard (mgoddard) wrote :

I have a fix for glanceclient, will propose.

Revision history for this message
Mark Goddard (mgoddard) wrote :

To clarify, the problem happens because multiple glance-api servers are running, and only one has the file available locally. This correctly returns a 204, the other returns 200 but has an empty body.

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

Other bug subscribers

Remote bug watches

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