Bug 893072

Summary: Glance - image download (from HTTP) should allow gzip/compressed encoding.
Product: Red Hat OpenStack Reporter: Yaniv Kaul <ykaul>
Component: openstack-glanceAssignee: Flavio Percoco <fpercoco>
Status: CLOSED ERRATA QA Contact: Giulio Fidente <gfidente>
Severity: medium Docs Contact:
Priority: high    
Version: 2.0 (Folsom)CC: abaron, dron, eglynn, fpercoco, gfidente, hateya, jkt, mlopes, scohen, sgordon
Target Milestone: Upstream M3Keywords: FutureFeature, Triaged
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-glance-2013.2-0.7.b3.el6ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1003487 (view as bug list) Environment:
Last Closed: 2013-12-19 18:56:16 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 975499, 1003487    

Description Yaniv Kaul 2013-01-08 09:19:47 EST
Description of problem:
When glance downloads images, it does not add to the HTTP request the header:
Accept-Encoding: gzip, deflate

This prevents it from getting compressed content.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Eoghan Glynn 2013-01-10 11:38:49 EST
I may be missing something here, but seems to me that .gz content can be used for the image content, it's just not deflated automatically on download.

But there's nothing to stop the image downloader from unzipping after the fact.

This seems logical to me, in terms of glance being agnostic to the image content format.
Comment 3 Eoghan Glynn 2013-01-10 11:47:58 EST
OK, I now see the point is to allow the image content to be compressed by the backend store as it's served out, as opposed to the compression being applied a priori to the image data before it's uploaded.
Comment 4 Flavio Percoco 2013-01-21 06:11:55 EST
Just to make it a bit clearer:

The idea here is that glance's stores should add gzip as its accepted encodings in order to be able to choose that format as encoding for data transmission.
Comment 5 Flavio Percoco 2013-03-06 07:30:19 EST
The migration to python-requests will fix part of this bug since the default Accept-Encoding value for requests is: 'gzip, deflate, compress'

Now, webob's response encode_content has to be call in glance in order to actually encode the response's content.
Comment 21 Giulio Fidente 2013-12-12 12:36:17 EST
by editing the -paste.ini and api.conf file appropriately this works as expected; I'm closing the bug in VERIFIED
Comment 23 errata-xmlrpc 2013-12-19 18:56:16 EST
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/RHEA-2013-1859.html