← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1360151] [NEW] utils.chunkreadable is not returning the correct chunk

 

Public bug reported:

During the testing with the master glance with S3, we found that
"utils.chunkreadable" is not returning the correct chunk if the image
location URL is specified.

Because "Implemented S3 multi-part upload functionality"
(https://review.openstack.org/#/c/49316/) is merged into master, if the
image to be created is specified as URL like below and its size is
greater than 100MB(as default), it will always fail.

$ glance image-create --name="Ubuntu1404 Cloud" --is-public=true
--container-format=ovf --disk-format=qcow2 --copy-from https://cloud-
images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img

Here is an excerpt from api.log.

2014-08-22 08:45:59.601 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
2014-08-22 08:46:01.188 13656 INFO glance.api.v1.images [-] Triggering asynchronous copy from external source
2014-08-22 08:46:01.192 13656 INFO glance.wsgi.server [-] 10.184.145.84 - - [22/Aug/2014 08:46:01] "POST /v1/images HTTP/1.1" 201 722 1.592873
2014-08-22 08:46:03.257 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=1, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:03.765 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=2, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:04.273 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=3, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:04.528 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=4, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:05.036 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=5, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:05.291 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=6, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:05.545 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=7, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:05.799 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=8, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:05.802 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=9, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.054 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=10, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.308 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=11, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.319 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=12, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.563 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=13, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.573 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=14, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.817 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=15, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:06.827 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=16, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.072 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=17, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.082 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=18, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.326 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=19, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.335 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=20, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.364 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=21, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.588 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=22, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.590 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=23, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.618 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=24, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.842 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=25, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
2014-08-22 08:46:07.918 13656 INFO glance.store.s3 [-] Multipart complete key=5f35132b-18e0-47a9-8d59-0370afd99230 UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw Wrote 1638400 bytes to S3 keynamed 5f35132b-18e0-47a9-8d59-0370afd99230 with checksum ce5344ca799c564cc356d6dd05d09059
2014-08-22 08:46:07.919 13656 ERROR glance.api.v1.upload_utils [-] Supplied size (255066624) and size generated from uploaded image (1638400) did not match. Setting image status to 'killed'.
2014-08-22 08:46:08.184 13656 ERROR glance.api.v1.upload_utils [-] Received HTTP error while uploading image 5f35132b-18e0-47a9-8d59-0370afd99230
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 141, in upload_data_to_store
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils     _kill_mismatched(image_meta, 'size', size)
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 137, in _kill_mismatched
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils     request=req)
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils HTTPBadRequest: Supplied size (255066624) and size generated from uploaded image (1638400) did not match. Setting image status to 'killed'.
2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils
2014-08-22 08:46:08.219 13656 INFO glance.registry.client.v1.client [-] Registry client request PUT /images/5f35132b-18e0-47a9-8d59-0370afd99230 raised Duplicate
2014-08-22 08:46:08.219 13656 ERROR glance.api.v1.upload_utils [-] Unable to kill image 5f35132b-18e0-47a9-8d59-0370afd99230:
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 76, in safe_kill
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     _kill(req, image_id, from_state)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 61, in _kill
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     from_state=from_state)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/api.py", line 169, in update_image_metadata
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     from_state=from_state)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 198, in update_image
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     headers=headers)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 130, in do_request
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     'exc_name': exc_name})
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/openstack/common/excutils.py", line 82, in __exit__
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     six.reraise(self.type_, self.value, self.tb)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 115, in do_request
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     **kwargs)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 68, in wrapped
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     return func(self, *args, **kwargs)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 388, in do_request
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     headers=copy.deepcopy(headers))
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 85, in wrapped
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     return func(self, method, url, body, headers)
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 537, in _do_request
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     raise exception.Duplicate(res.read())
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils Duplicate: Image operation conflicts
2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils

If the image(same size) is specified the local file like below, it works
fine.

$ ls -l trusty-server-cloudimg-amd64-disk1.img
-rw-rw-r-- 1 ubuntu ubuntu 255066624 Aug 20 04:44 trusty-server-cloudimg-amd64-disk1.img
$

$ glance image-create --name="Ubuntu1404 Local" --is-public=true
--container-format=ovf --disk-format=qcow2 < ./trusty-server-cloudimg-
amd64-disk1.img

2014-08-22 08:45:22.653 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
2014-08-22 08:45:22.870 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
2014-08-22 08:45:23.443 13656 INFO oslo.messaging._drivers.impl_rabbit [-] Connecting to AMQP server on 10.184.145.84:5672
2014-08-22 08:45:23.462 13656 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 10.184.145.84:5672
2014-08-22 08:45:23.907 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=1, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:24.087 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=2, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:24.261 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=3, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:24.464 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=4, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:24.645 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=5, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:24.849 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=6, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:25.050 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=7, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:25.246 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=8, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:25.446 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=9, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:25.648 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=10, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:27.172 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=11, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:27.329 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=12, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:27.532 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=13, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:27.666 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=14, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:27.931 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=15, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:28.139 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=16, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:28.330 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=17, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:28.533 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=18, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:28.731 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=19, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:28.950 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=20, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:29.741 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=21, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:29.958 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=22, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:30.153 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=23, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:30.636 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=24, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:30.729 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=25, size=3408384, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
2014-08-22 08:45:32.064 13656 INFO glance.store.s3 [-] Multipart complete key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA Wrote 255066624 bytes to S3 keynamed e6b01d04-82fe-46b2-86ea-3e9e66a5123b with checksum 64ed4d0a696f6aae29068e03a606e1b7

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1360151

Title:
  utils.chunkreadable is not returning the correct chunk

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  During the testing with the master glance with S3, we found that
  "utils.chunkreadable" is not returning the correct chunk if the image
  location URL is specified.

  Because "Implemented S3 multi-part upload functionality"
  (https://review.openstack.org/#/c/49316/) is merged into master, if
  the image to be created is specified as URL like below and its size is
  greater than 100MB(as default), it will always fail.

  $ glance image-create --name="Ubuntu1404 Cloud" --is-public=true
  --container-format=ovf --disk-format=qcow2 --copy-from https://cloud-
  images.ubuntu.com/trusty/current/trusty-server-cloudimg-
  amd64-disk1.img

  Here is an excerpt from api.log.

  2014-08-22 08:45:59.601 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
  2014-08-22 08:46:01.188 13656 INFO glance.api.v1.images [-] Triggering asynchronous copy from external source
  2014-08-22 08:46:01.192 13656 INFO glance.wsgi.server [-] 10.184.145.84 - - [22/Aug/2014 08:46:01] "POST /v1/images HTTP/1.1" 201 722 1.592873
  2014-08-22 08:46:03.257 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=1, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:03.765 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=2, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:04.273 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=3, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:04.528 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=4, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:05.036 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=5, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:05.291 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=6, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:05.545 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=7, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:05.799 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=8, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:05.802 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=9, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.054 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=10, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.308 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=11, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.319 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=12, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.563 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=13, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.573 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=14, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.817 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=15, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:06.827 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=16, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.072 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=17, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.082 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=18, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.326 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=19, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.335 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=20, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.364 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=21, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.588 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=22, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.590 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=23, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.618 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=24, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.842 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=25, size=65536, key=5f35132b-18e0-47a9-8d59-0370afd99230, UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw
  2014-08-22 08:46:07.918 13656 INFO glance.store.s3 [-] Multipart complete key=5f35132b-18e0-47a9-8d59-0370afd99230 UploadId=MmI0ZDY2NTQ5MTQwODY5NzE2MjI2Mw Wrote 1638400 bytes to S3 keynamed 5f35132b-18e0-47a9-8d59-0370afd99230 with checksum ce5344ca799c564cc356d6dd05d09059
  2014-08-22 08:46:07.919 13656 ERROR glance.api.v1.upload_utils [-] Supplied size (255066624) and size generated from uploaded image (1638400) did not match. Setting image status to 'killed'.
  2014-08-22 08:46:08.184 13656 ERROR glance.api.v1.upload_utils [-] Received HTTP error while uploading image 5f35132b-18e0-47a9-8d59-0370afd99230
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 141, in upload_data_to_store
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils     _kill_mismatched(image_meta, 'size', size)
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 137, in _kill_mismatched
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils     request=req)
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils HTTPBadRequest: Supplied size (255066624) and size generated from uploaded image (1638400) did not match. Setting image status to 'killed'.
  2014-08-22 08:46:08.184 13656 TRACE glance.api.v1.upload_utils
  2014-08-22 08:46:08.219 13656 INFO glance.registry.client.v1.client [-] Registry client request PUT /images/5f35132b-18e0-47a9-8d59-0370afd99230 raised Duplicate
  2014-08-22 08:46:08.219 13656 ERROR glance.api.v1.upload_utils [-] Unable to kill image 5f35132b-18e0-47a9-8d59-0370afd99230:
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 76, in safe_kill
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     _kill(req, image_id, from_state)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/api/v1/upload_utils.py", line 61, in _kill
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     from_state=from_state)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/api.py", line 169, in update_image_metadata
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     from_state=from_state)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 198, in update_image
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     headers=headers)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 130, in do_request
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     'exc_name': exc_name})
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/openstack/common/excutils.py", line 82, in __exit__
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     six.reraise(self.type_, self.value, self.tb)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/registry/client/v1/client.py", line 115, in do_request
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     **kwargs)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 68, in wrapped
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     return func(self, *args, **kwargs)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 388, in do_request
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     headers=copy.deepcopy(headers))
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 85, in wrapped
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     return func(self, method, url, body, headers)
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils   File "/opt/stack/glance/glance/common/client.py", line 537, in _do_request
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils     raise exception.Duplicate(res.read())
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils Duplicate: Image operation conflicts
  2014-08-22 08:46:08.219 13656 TRACE glance.api.v1.upload_utils

  If the image(same size) is specified the local file like below, it
  works fine.

  $ ls -l trusty-server-cloudimg-amd64-disk1.img
  -rw-rw-r-- 1 ubuntu ubuntu 255066624 Aug 20 04:44 trusty-server-cloudimg-amd64-disk1.img
  $

  $ glance image-create --name="Ubuntu1404 Local" --is-public=true
  --container-format=ovf --disk-format=qcow2 < ./trusty-server-cloudimg-
  amd64-disk1.img

  2014-08-22 08:45:22.653 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
  2014-08-22 08:45:22.870 13656 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.184.145.84
  2014-08-22 08:45:23.443 13656 INFO oslo.messaging._drivers.impl_rabbit [-] Connecting to AMQP server on 10.184.145.84:5672
  2014-08-22 08:45:23.462 13656 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 10.184.145.84:5672
  2014-08-22 08:45:23.907 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=1, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:24.087 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=2, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:24.261 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=3, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:24.464 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=4, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:24.645 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=5, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:24.849 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=6, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:25.050 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=7, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:25.246 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=8, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:25.446 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=9, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:25.648 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=10, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:27.172 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=11, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:27.329 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=12, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:27.532 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=13, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:27.666 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=14, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:27.931 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=15, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:28.139 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=16, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:28.330 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=17, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:28.533 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=18, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:28.731 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=19, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:28.950 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=20, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:29.741 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=21, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:29.958 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=22, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:30.153 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=23, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:30.636 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=24, size=10485760, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:30.729 13656 INFO glance.store.s3 [-] Uploading upload part in S3 partnum=25, size=3408384, key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b, UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA
  2014-08-22 08:45:32.064 13656 INFO glance.store.s3 [-] Multipart complete key=e6b01d04-82fe-46b2-86ea-3e9e66a5123b UploadId=NGU5NDY2NTgyMTQwODY5NzEyMzU3OA Wrote 255066624 bytes to S3 keynamed e6b01d04-82fe-46b2-86ea-3e9e66a5123b with checksum 64ed4d0a696f6aae29068e03a606e1b7

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1360151/+subscriptions


Follow ups

References