Bug 1004398
Summary: | glance: no size check when creating an image from http | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Dafna Ron <dron> | ||||
Component: | openstack-glance | Assignee: | Flavio Percoco <fpercoco> | ||||
Status: | CLOSED ERRATA | QA Contact: | Tzach Shefi <tshefi> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | unspecified | CC: | abaron, ddomingo, eglynn, fpercoco, hateya, jruzicka, sradvan, yeylon | ||||
Target Milestone: | rc | Keywords: | Triaged | ||||
Target Release: | 4.0 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | storage | ||||||
Fixed In Version: | openstack-glance-2013.2-3.el6ost | Doc Type: | Bug Fix | ||||
Doc Text: |
Cause:
Glance didn't do any size verification on image-creation
Consequence:
It was possible to create images with a smaller size value - using `--size` - than the real one.
Fix:
Glance API v1 now checks the size of the image being uploaded and raises an error if it doesn't match the image's size.
Result:
Glance images are verified upon creation and include improved error handling.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-12-20 00:23:28 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Dafna Ron
2013-09-04 14:30:09 UTC
It looks like it could be possible to explicitly - letting the user know -- ignore --size when --location is used. It needs to be discussed upstream. As mentioned in the upstream bug, I'll bring this up in one of the next meetings. Moving it to python-glanceclient for now since this change will affect the client instead. Bug fix verified, output as expected. Image-create (with intentional small size limit), now fails both methods direct file as well as http uploads. Versions used during verification: Red Hat Enterprise Linux Server release 6.5 (Santiago) openstack-glance-2013.2-3.el6ost.noarch Ouput: Failed upload of local image file as source. [root@cougar01 iso(keystone_admin)]# glance image-create --name BZ_local_iso_image --disk-format qcow2 --container-format bare --file /tmp/iso/rhel-server-x86_64-kvm-6.4_20130130.0-2-sda.qcow2 --size 2 Request returned failure status. HTTPInternalServerError (HTTP 500) Failed upload of image http as source. [root@cougar01 iso(keystone_admin)]# glance image-create --name BZ_htto_image --disk-format qcow2 --container-format bare --location http://download.eng.tlv.redhat.com/rel-eng/RHEL6.4-20130130.0/6/Appliance/rhel-server-x86_64-kvm-6.4_20130130.0-2-sda.qcow2 --human-readable --size 2 Request returned failure status. 409 Conflict Provided image size must match the stored image size. (provided size: 2, stored size: 1974140928) (HTTP 409) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1859.html |