OpenStack Image Management (Glance)
Go to file
Matthew Treinish bf7887a102
Replace body_file with class to call uwsgi.chunked_read()
Since the WebOb 1.7 release webob doesn't natively support receiving
chunked transfer encoding bodies. [1] When glance is run under the
eventlet wsgi server this was fine, because eventlet will dechunk the
input on read() (or readline()) calls, so from the webob perspective
it's just a file object. However, the effort to remove the dependence
on using eventlet as the web server and deploy glance as a traditional
wsgi script we lose this mechanism. The wsgi spec doesn't provide a
consistent mechanism

When we run glance under uwsgi the uwsgi server provides an api to read
chunked data. [2] However, we need to explicitly call that api when to
dechunk the data and pass it to glance code which expects a file object.
This commit solves this issue by creating a fake file class that will
call the chunked_read() api from uwsgi on read() calls. This object is
then used if we're running the api code under uwsgi and the body has a
chunked transfer-encoding.

In conjuction with devstack change
Iab2e2848877fa1497008d18c05b0154892941589 this closes glance bug 1703856

[1] https://docs.pylonsproject.org/projects/webob/en/stable/whatsnew-1.7.html#backwards-incompatibility
[2] http://uwsgi-docs.readthedocs.io/en/latest/Chunked.html

Partial-bug 1703856

Co-Authored-By: Chris Dent <cdent@anticdent.org>

Change-Id: Idf6b4b891ba31cccbeb53d373b40fce5380cea64
2017-10-18 17:25:22 -04:00
api-ref/source Bump Images API to v2.6 2017-08-06 09:19:13 -04:00
doc/source Merge "Remove datastore_name and datacenter_path" 2017-08-04 22:00:33 +00:00
etc Refresh config files for Pike RC-1 2017-08-10 12:11:33 -04:00
glance Replace body_file with class to call uwsgi.chunked_read() 2017-10-18 17:25:22 -04:00
httpd Add docs and sample configs for running glance with apache 2017-06-18 04:00:48 -04:00
rally-jobs Merge "Add 'vhdx' disk format." 2016-08-01 18:32:59 +00:00
releasenotes Merge "Imported Translations from Zanata" 2017-08-11 20:13:57 +00:00
tools Prepare for using standard python tests 2017-02-03 20:11:48 +01:00
.coveragerc Update .coveragerc after the removal of openstack directory 2016-10-17 17:09:56 +05:30
.gitignore rearrange existing documentation to follow the new layout standard 2017-06-21 14:15:58 -04:00
.gitreview Add .gitreview config file for gerrit. 2011-10-24 11:02:16 -04:00
.mailmap Add a mailmap entry for myself 2014-02-11 12:00:44 +08:00
.testr.conf Allow specifying OS_TEST_PATH (to reduce tests ran) 2016-11-07 11:09:26 -08:00
CONTRIBUTING.rst Update the documention for doc migration 2017-08-02 07:22:46 +00:00
HACKING.rst Stop enforcing translations on logs 2017-05-31 11:35:53 +01:00
LICENSE Add a LICENSE file. 2012-01-03 10:14:01 -05:00
README.rst Remove team:diverse-affiliation from tags 2017-07-21 14:52:59 +01:00
babel.cfg Added first step of babel-based translations. 2012-02-28 02:00:37 -08:00
bandit.yaml Move bandit into pep8 2016-02-26 08:12:45 +01:00
pylintrc Typo in pylintrc file 2015-03-25 11:21:16 +01:00
requirements.txt Updated from global requirements 2017-08-08 12:11:49 +00:00
setup.cfg doc: Explicitly set 'builders' option 2017-07-07 17:52:25 +00:00
setup.py Updated from global requirements 2017-03-04 01:43:26 +00:00
test-requirements.txt Updated from global requirements 2017-07-27 20:21:01 +00:00
tox.ini Clean up py35 env in tox.ini. 2017-05-09 22:54:59 +00:00

README.rst

Team and repository tags

The following tags have been asserted for the Glance project:
"project:official",
"tc:approved-release",
"stable:follows-policy",
"tc:starter-kit:compute",
"vulnerability:managed",
"assert:supports-upgrade",
"assert:follows-standard-deprecation".
Follow the link for an explanation of these tags.

Glance

Glance is a project that provides services and associated libraries to store, browse, share, distribute and manage bootable disk images, other data closely associated with initializing compute resources, and metadata definitions.

Use the following resources to learn more:

API

To learn how to use Glance's API, consult the documentation available online at:

Developers

For information on how to contribute to Glance, please see the contents of the CONTRIBUTING.rst in this repository.

Any new code must follow the development guidelines detailed in the HACKING.rst file, and pass all unit tests.

Further developer focused documentation is available at:

Operators

To learn how to deploy and configure OpenStack Glance, consult the documentation available online at:

In the unfortunate event that bugs are discovered, they should be reported to the appropriate bug tracker. You can raise bugs here:

Other Information

During each design summit, we agree on what the whole community wants to focus on for the upcoming release. You can see image service plans:

For more information about the Glance project please see: