Glance WSGI image upload fails

Bug #1298462 reported by Alvaro Lopez on 2014-03-27
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Hi there.

When running latest Havana Glance behind an Apache httpd server with mod_wsgi, an image upload fails with the following error:

    2014-03-27 14:15:25.656 7292 DEBUG glance.api.v1.upload_utils [-] Client disconnected before sending all data to backend upload_data_to_store /usr/lib/python2.7/dist-packages/glance/api/v1/

Narrowing this down, this is similar to this ML thread (except the error shown):

Applying the patch in that thread, solves the error.

Changed in glance:
assignee: nobody → Arnaud Legendre (arnaudleg)
Alvaro Lopez (aloga) wrote :

@arnaudleg: Are you working on this? I have some code ready and I can contribute it.

Arnaud Legendre (arnaudleg) wrote :

@aloga: go ahead

Changed in glance:
assignee: Arnaud Legendre (arnaudleg) → nobody
Changed in glance:
assignee: nobody → shruti (shrutisharma0810)
Changed in glance:
assignee: shruti (shrutisharma0810) → nobody
Jay Wang (jaywang144) on 2014-10-15
Changed in glance:
assignee: nobody → Jay Wang (jaywang144)
Jay Wang (jaywang144) wrote :

I tried to recreate the problem but not successful. I used the a wsgi file at /opt/stack/horizon/openstack_dashboard/wsgi/django.wsgi for testing. Then basically run it through the chunkreadable and chunkiter functions in the utils. However, I don't seem to encounter any read error even the last read size is greater than the data left. The code base I use is from Juno. Is it still a problem? Or I should use a different wsgi file for recreating the problem. Please advise if this is still a valid bug. Thanks.

Kent Wang ( on 2015-03-30
Changed in glance:
status: New → Incomplete
Changed in glance:
importance: Undecided → Low
Brian Rosmaita (brian-rosmaita) wrote :

Using mod_wsgi is not recommended with Glance. The mod_wsgi protocol does not support Transfer-Encoding: chunked and therefore makes it unsuitable for use with Glance. However, you could theoretically deploy Glance using mod_wsgi but it will fail on any requests that use a chunked transfer encoding.


Changed in glance:
assignee: Jay Wang (jaywang144) → nobody
importance: Low → Undecided
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers