Ask Your Question

Revision history [back]

Glance cannot store images greater than 5GB in Swift

Hello, I cannot upload greater image than 5 GB into Glance on Swift. I have CentOS 6.5 and last update Stable Havana 2013.2.3 It is same like this bug https://bugs.launchpad.net/glance/+bug/1297465

2014-04-22 09:01:42.447 5477 ERROR glance.api.v1.upload_utils [75fa5a67-8638-41e5-981f-765b58b96b81 2879936f442d439098a0254737a2621b 538de79e7e8342c6acb869d98f96efde] Failed to upload image d7ea09a9-ca43-4100-bf97-b941ed20a3b7
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/glance/api/v1/upload_utils.py", line 101, in upload_data_to_store
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     store)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/glance/store/__init__.py", line 338, in store_add_to_backend
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/glance/store/swift.py", line 384, in add
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     content_length=content_length)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 1318, in put_object
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     response_dict=response_dict)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 1192, in _retry
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     rv = func(self.url, self.token, *args, **kwargs)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 943, in put_object
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     conn.putrequest(path, headers=headers, data=contents)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 197, in putrequest
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     return self.request('PUT', full_path, data, headers, files)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 187, in request
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     files=files, **self.requests_args)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/swiftclient/client.py", line 176, in _request
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     return requests.request(*arg, **kwarg)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/requests/api.py", line 44, in request
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     return session.request(method=method, url=url, **kwargs)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 276, in request
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     prep = req.prepare()
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/requests/models.py", line 224, in prepare
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     p.prepare_body(self.data, self.files)
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.6/site-packages/requests/models.py", line 384, in prepare_body
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils     self.headers['Content-Length'] = str(len(body))
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils TypeError: object of type 'ChunkReader' has no len()
2014-04-22 09:01:42.447 5477 TRACE glance.api.v1.upload_utils