← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1220797] Re: can update image size to smaller number even though cannot create it like that in the first place

 

Admin is allowed to change the image size.

** Changed in: glance
       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/1220797

Title:
  can update image size to smaller number even though cannot create it
  like that in the first place

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

Bug description:
  if you try to create an image from file using the --size and giving a smaller size the source image we would fail
  but we can use glance image-update to change the file after we create it. 
  so wither we do not need the size check to begin with or both should fail. 

  create image from a file (since this is the only time we currently
  check the size)

  glance image-create --name image_size_file --disk-format qcow2
  --container-format bare --file /tmp/39f89a6a-7fbb-43c0-a5ea-
  19b271f51829

  [root@opens-vdsb ~(keystone_admin)]# glance image-list 
  +--------------------------------------+------------------+-------------+------------------+------------+--------+
  | ID                                   | Name             | Disk Format | Container Format | Size       | Status |
  +--------------------------------------+------------------+-------------+------------------+------------+--------+
  | 23bf4915-9f83-4eb5-a7c2-702de4d825e7 | image_size_file  | qcow2       | bare             | 1440612352 | active |

  [root@opens-XXXX ~(keystone_admin)]# glance image-update 23bf4915-9f83-4eb5-a7c2-702de4d825e7 --size 1
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 18b7d574b7a1f0093fefc5484d9fb68d     |
  | container_format | bare                                 |
  | created_at       | 2013-09-04T15:47:55                  |
  | deleted          | False                                |
  | deleted_at       | None                                 |
  | disk_format      | qcow2                                |
  | id               | 23bf4915-9f83-4eb5-a7c2-702de4d825e7 |
  | is_public        | False                                |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | image_size_file                      |
  | owner            | ad326a6c11a742c6bfdf4ad63be0c889     |
  | protected        | False                                |
  | size             | 1                                    |
  | status           | active                               |
  | updated_at       | 2013-09-04T15:49:26                  |
  +------------------+--------------------------------------+

  
  [root@opens-vdsb ~(keystone_admin)]# glance image-list 
  +--------------------------------------+------------------+-------------+------------------+------------+--------+
  | ID                                   | Name             | Disk Format | Container Format | Size       | Status |
  +--------------------------------------+------------------+-------------+------------------+------------+--------+
  | 23bf4915-9f83-4eb5-a7c2-702de4d825e7 | image_size_file  | qcow2       | bare             | 1          | active |

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