← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1220744] Re: no size check when using http to create an image

 

This seems to have been fixed server-side and there are too many cases
to handle on the client side to fix this there. I'm marking this as
invalid. If there's renewed interest in this, we can always reopen it.

** Changed in: python-glanceclient
       Status: New => Invalid

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

Title:
  no size check when using http to create an image

Status in Glance:
  Fix Released
Status in Glance Client:
  Invalid

Bug description:
  if I create an image from file and use --size which is smaller than
  the image on file we would fail with the below error:

  root@opens-XXXX ~(keystone_admin)]# glance image-create --name rhevm_image --disk-format qcow2 --container-format bare --file /tmp/39f89a6a-7fbb-43c0-a5ea-19b271f51829 --size 1
  Request returned failure status.
  400 Bad Request
  Supplied size (1) and size generated from uploaded image (1440612352) did not match. Setting image status to 'killed'.
      (HTTP 400)

  but if I create an image from http and use a smaller size the image is
  created:

  [root@opens-XXX ~(keystone_admin)]# glance image-create --name human
  --disk-format qcow2 --container-format bare --location http://XXXXXXX
  --human-readable --size 1

  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | None                                 |
  | container_format | bare                                 |
  | created_at       | 2013-09-04T14:18:05                  |
  | deleted          | False                                |
  | deleted_at       | None                                 |
  | disk_format      | qcow2                                |
  | id               | 55d45384-6b4b-40c6-b399-639b03c06c3b |
  | is_public        | False                                |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | human                                |
  | owner            | ad326a6c11a742c6bfdf4ad63be0c889     |
  | protected        | False                                |
  | size             | 1B                                   |
  | status           | active                               |
  | updated_at       | 2013-09-04T14:18:05                  |
  +------------------+--------------------------------------+

  
  [root@opens-XXXX ~(keystone_admin)]# glance image-list
  +--------------------------------------+-------------+-------------+------------------+------------+--------+
  | ID                                   | Name        | Disk Format | Container Format | Size       | Status |
  +--------------------------------------+-------------+-------------+------------------+------------+--------+
  | 55d45384-6b4b-40c6-b399-639b03c06c3b | human       | qcow2       | bare             | 1          | active |
  |+--------------------------------------+-------------+-------------+------------------+------------+--------+

  if size is too small we should not allow the create of the image from
  http as well

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