Comment 3 for bug 1360151

Revision history for this message
Masashi Ozawa (mozawa) wrote :

OK. It's because the fixed chunk size(16M) is used for "--copy-from" case.

[http.py]
class Store(glance.store.base.Store):

    """An implementation of the HTTP(S) Backend Adapter"""

    def get(self, location):
        """
        Takes a `glance.store.location.Location` object that indicates
        where to find the image file, and returns a tuple of generator
        (for reading the image file) and image_size

        :param location `glance.store.location.Location` object, supplied
                        from glance.store.location.get_location_from_uri()
        """
        conn, resp, content_length = self._query(location, 'GET')

        iterator = http_response_iterator(conn, resp, self.CHUNKSIZE)

[base.py]
class Store(object):

    CHUNKSIZE = (16 * 1024 * 1024) # 16M

    def __init__(self, context=None, location=None):