Glance WSGI image upload fails

Bug #1298462 reported by Alvaro Lopez
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Won't Fix
Undecided
Unassigned

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/upload_utils.py:231

Narrowing this down, this is similar to this ML thread (except the error shown): http://lists.openstack.org/pipermail/openstack-dev/2013-December/022510.html

Applying the patch in that thread, solves the error.

Changed in glance:
assignee: nobody → Arnaud Legendre (arnaudleg)
Revision history for this message
Alvaro Lopez (aloga) wrote :

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

Revision history for this message
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)
Changed in glance:
assignee: nobody → Jay Wang (jaywang144)
Revision history for this message
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 (k.wang)
Changed in glance:
status: New → Incomplete
Changed in glance:
importance: Undecided → Low
Revision history for this message
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.

see: https://docs.openstack.org/glance/latest/admin/apache-httpd.html

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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