← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1726518] Re: Image not deleted after upload when exceeding image_size_cap

 

Fix proposed to branch: master
Review: https://review.openstack.org/516401

** Changed in: glance
       Status: Opinion => In Progress

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

Title:
  Image not deleted after upload when exceeding image_size_cap

Status in Glance:
  In Progress

Bug description:
  When specifying a maximum size cap in glance-api.conf using
  'image_size_cap', and then trying to upload an image that exceeds that
  size cap a warning is returned that the image is too large and it is
  not actually uploaded into the backend, however the entry for the
  image will stay in the glance database as queued until it is manually
  deleted

  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | None                                 |
  | container_format | bare                                 |
  | created_at       | 2017-10-23T15:33:54Z                 |
  | disk_format      | qcow2                                |
  | id               | 83ffbe5a-667b-42ff-a742-fc88bf3132e3 |
  | locations        | []                                   |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | cap_test                             |
  | owner            | db03a56c279b4c9d83bc897a2221725a     |
  | protected        | False                                |
  | size             | None                                 |
  | status           | queued                               |
  | tags             | []                                   |
  | updated_at       | 2017-10-23T15:33:54Z                 |
  | virtual_size     | None                                 |
  | visibility       | private                              |
  +------------------+--------------------------------------+
  413 Request Entity Too Large: Image exceeds the storage quota: The size of the data None will exceed the limit. None bytes remaining. (HTTP 413)

  =================================================================================

  +------------------+------------------------------------------------------+
  | Field            | Value                                                |
  +------------------+------------------------------------------------------+
  | checksum         | None                                                 |
  | container_format | bare                                                 |
  | created_at       | 2017-10-23T15:33:54Z                                 |
  | disk_format      | qcow2                                                |
  | file             | /v2/images/83ffbe5a-667b-42ff-a742-fc88bf3132e3/file |
  | id               | 83ffbe5a-667b-42ff-a742-fc88bf3132e3                 |
  | min_disk         | 0                                                    |
  | min_ram          | 0                                                    |
  | name             | cap_test                                             |
  | owner            | db03a56c279b4c9d83bc897a2221725a                     |
  | properties       | locations='[]'                                       |
  | protected        | False                                                |
  | schema           | /v2/schemas/image                                    |
  | size             | None                                                 |
  | status           | queued                                               |
  | tags             |                                                      |
  | updated_at       | 2017-10-23T15:34:10Z                                 |
  | virtual_size     | None                                                 |
  | visibility       | private                                              |
  +------------------+------------------------------------------------------+

  This behaviour is undesirable. When a user attempts to upload an image
  that exceeds the size cap the entry should not be added to the glance
  image database, and should not appear in 'glance image-list'.

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


References