48449171a7
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 |
||
---|---|---|
.. | ||
glance-api.conf | ||
glance-cache.conf | ||
glance-registry.conf | ||
glance-scrubber.conf | ||
logging.cnf.sample |