glance/etc
Ewan Mellor 48449171a7 Bug #909533: Swift uploads through Glance using ridiculously small chunks
Remove the use of a temporary disk buffer when streaming to Swift.  This
was added on the assumption that it was not possible to stream chunks to
Swift direct from webob.Request.body_file.  That's not true -- a simple
file-like object wrapping body_file does the job perfectly.

This removes the need for swift_store_object_buffer_dir in the config file.
It is also significantly cheaper, since there is one copy fewer.

Fix the parsing of the swift_store_large_object_size and
swift_store_large_object_chunk_size options.  These are
specified in MB in the config file, but needs to be in bytes internally,
because they are compared against the image_size parameter given to add().

Update the unit tests to match.  This includes an additional check that
put_object is called the correct number of times.  The unit tests missed the
latter problem problem because there was no check that a small object is only
uploaded in one chunk, and despite the comment to the contrary there was no
check that the right number of chunks were written in the large-object case
either.  Added these in all places where store.add is called.

Change-Id: Ieb4cf68516b53bd16d2671e49e805b26118b3671
2012-01-06 19:44:49 -05:00
..
glance-api.conf Bug #909533: Swift uploads through Glance using ridiculously small chunks 2012-01-06 19:44:49 -05:00
glance-cache.conf Add generic PasteDeploy app and filter factories 2011-12-07 12:42:03 +00:00
glance-registry.conf Add ability to specify syslog facility 2012-01-03 08:55:14 -05:00
glance-scrubber.conf Add generic PasteDeploy app and filter factories 2011-12-07 12:42:03 +00:00
logging.cnf.sample First round of logging functionality: 2011-02-01 13:18:40 -05:00