Description of problem: ======================= It seems to be HTTP's store back-end fault. Images coming from Berrange's Fedora people account are gzip and without content-length which seems not to be supported by the HTTP Store[0]. The output of HEAD requests: This one doesn't work: $ http HEAD http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2 HTTP/1.1 200 OK Accept-Ranges: bytes Connection: close Content-Encoding: gzip Content-Type: text/plain; charset=UTF-8 Date: Thu, 13 Jun 2013 09:52:58 GMT ETag: "f050000-4ce9a8e6356c3" Last-Modified: Fri, 16 Nov 2012 10:51:56 GMT Server: Apache/2.2.15 Vary: Accept-Encoding,User-Agent This one works: $ http HEAD http://<URL>/rhel-server-x86_64-kvm-6.4_20130130.0-2-sda.qcow2 HTTP/1.1 200 OK Accept-Ranges: bytes Connection: close Content-Length: 1974140928 Content-Type: text/plain; charset=UTF-8 Date: Thu, 13 Jun 2013 09:53:48 GMT ETag: "3dfbc9b-75ab0000-4d5c49badaf40" Last-Modified: Fri, 15 Feb 2013 14:58:29 GMT Server: Apache [0] https://github.com/openstack/glance/blob/stable/grizzly/glance/store/http.py#L126 Version-Release number of selected component (if applicable): ============================================================= openstack-glance-2013.1-3.el6ost.noarch How reproducible: ================= 3/3 Steps to Reproduce: =================== Load an image to glance as follows: # glance image-create --name test --disk-format qcow2 --container-format bare --copy-from http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2 --is-public true Actual results: =============== 1. Image not loaded to glance and failed with the following error: api.log:2013-06-13 11:39:32.581 13504 ERROR glance.api.v1.images [-] Supplied size (251985920) and size generated from uploaded image (132292056) did not match. Setting image status to 'killed'. Expected results: ================= The image should be loaded with no errors.
I have tested this in both latest git using devstack and in the official havana release and the command executes succesfully on both. I belive it is no longer a bug.
I moved it to MODIFIED since the fix is part of havana, but I think it should be retested by QE just to be safe.
Here is my console output for the test: ~ $ glance image-list +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+ | a8d4db77-1812-4514-9302-9a89df0bf0d7 | cirros-0.3.1-x86_64-uec | ami | ami | 25165824 | active | | d356d5f9-08f2-4576-b2e6-472d1f471a61 | cirros-0.3.1-x86_64-uec-kernel | aki | aki | 4955792 | active | | 3e964d3f-2556-4580-bb96-a159bf676ad3 | cirros-0.3.1-x86_64-uec-ramdisk | ari | ari | 3714968 | active | +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+ ~ $ glance image-create --name test --disk-format qcow2 --container-format bare --copy-from http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2 --is-public true +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | None | | container_format | bare | | created_at | 2013-11-22T23:06:47 | | deleted | False | | deleted_at | None | | disk_format | qcow2 | | id | 11212204-70e8-4e10-9ff6-3b594e9ace67 | | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | test | | owner | 606ea027e1de4277a20b17ce5b247f4d | | protected | False | | size | 251985920 | | status | queued | | updated_at | 2013-11-22T23:06:47 | +------------------+--------------------------------------+ ~ $ glance image-list +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ | a8d4db77-1812-4514-9302-9a89df0bf0d7 | cirros-0.3.1-x86_64-uec | ami | ami | 25165824 | active | | d356d5f9-08f2-4576-b2e6-472d1f471a61 | cirros-0.3.1-x86_64-uec-kernel | aki | aki | 4955792 | active | | 3e964d3f-2556-4580-bb96-a159bf676ad3 | cirros-0.3.1-x86_64-uec-ramdisk | ari | ari | 3714968 | active | | 11212204-70e8-4e10-9ff6-3b594e9ace67 | test | qcow2 | bare | 251985920 | saving | +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
verified the bug on: python-glanceclient-0.10.0-1.el6ost.noarch python-glance-2013.2-3.el6ost.noarch openstack-glance-2013.2-3.el6ost.noarch
I updated the doc text, let me know if you need anything else.
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