yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #61522
[Bug 1664709] [NEW] Partial download of image fails when using image caching
Public bug reported:
When using Content-Range for a partial download of an image with image caching enabled,
the partial download fails due to a cache error as in [0]
This is because, the downloaded image is also getting cached using tee-
iter in image_cache/__init__.py. Here there is a check for the images
checksum and the download's checksum. With partial download, there is a
mismatch of the full image checksum and the partial image checksum
resulting in a 500.
Steps to reproduce:
1. Create an image
glance image-create --name test1 --visibility public --container-format bare --disk-format qcow2 < /home/stack/devstack/local.conf
2. Verify image creation and run the script to do a partial download.
2.a. glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| a3e38525-ad23-4ccb-9641-841f432ecf4a | cirros-0.3.4-x86_64-uec |
| b3d0a0b6-5082-4250-a3d2-951992343a6e | cirros-0.3.4-x86_64-uec-kernel |
| d123b95a-b00a-4db9-891b-a965c254581b | cirros-0.3.4-x86_64-uec-ramdisk |
| 59c7e82a-6150-46b6-b19f-b93396bd5d8b | test1 |
+--------------------------------------+---------------------------------+
2.b. Execute the script that will request for a partial download of the
above created image. [1]
Fails with a 500. Traceback is as here: [2]
The full download goes through successfully though. [3]
[0] https://github.com/openstack/glance/blob/master/glance/image_cache/__init__.py#L360-L364
[1] http://paste.openstack.org/show/598886/
[2] http://paste.openstack.org/show/598881/
[3] http://paste.openstack.org/show/598887/
We need to educate cache here about a partial download to prevent this.
** Affects: glance
Importance: Undecided
Assignee: Dharini Chandrasekar (dharini-chandrasekar)
Status: New
** Changed in: glance
Assignee: (unassigned) => Dharini Chandrasekar (dharini-chandrasekar)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1664709
Title:
Partial download of image fails when using image caching
Status in Glance:
New
Bug description:
When using Content-Range for a partial download of an image with image caching enabled,
the partial download fails due to a cache error as in [0]
This is because, the downloaded image is also getting cached using
tee-iter in image_cache/__init__.py. Here there is a check for the
images checksum and the download's checksum. With partial download,
there is a mismatch of the full image checksum and the partial image
checksum resulting in a 500.
Steps to reproduce:
1. Create an image
glance image-create --name test1 --visibility public --container-format bare --disk-format qcow2 < /home/stack/devstack/local.conf
2. Verify image creation and run the script to do a partial download.
2.a. glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| a3e38525-ad23-4ccb-9641-841f432ecf4a | cirros-0.3.4-x86_64-uec |
| b3d0a0b6-5082-4250-a3d2-951992343a6e | cirros-0.3.4-x86_64-uec-kernel |
| d123b95a-b00a-4db9-891b-a965c254581b | cirros-0.3.4-x86_64-uec-ramdisk |
| 59c7e82a-6150-46b6-b19f-b93396bd5d8b | test1 |
+--------------------------------------+---------------------------------+
2.b. Execute the script that will request for a partial download of
the above created image. [1]
Fails with a 500. Traceback is as here: [2]
The full download goes through successfully though. [3]
[0] https://github.com/openstack/glance/blob/master/glance/image_cache/__init__.py#L360-L364
[1] http://paste.openstack.org/show/598886/
[2] http://paste.openstack.org/show/598881/
[3] http://paste.openstack.org/show/598887/
We need to educate cache here about a partial download to prevent
this.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1664709/+subscriptions
Follow ups