no error reported by client when image create is killed on quota

Bug #1368854 reported by Dafna Ron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Abhishek Kekane

Bug Description

no ERROR is issued to user on quota violation:

root@tigris01 ~(keystone_admin)]# glance image-create --name dafna2 --disk-format qcow2 --container-format bare --copy-from <image>
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | bare |
| created_at | 2014-09-12T15:54:58 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 7fd5545b-271e-4a83-9876-ffeba4d54eb8 |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | dafna2 |
| owner | 8f8749df409d4bbab5d982384b0d6ab0 |
| protected | False |
| size | 6442450945 |
| status | queued |
| updated_at | 2014-09-12T15:54:58 |
| virtual_size | None |
+------------------+--------------------------------------+
[root@tigris01 ~(keystone_admin)]# glance image-list
+--------------------------------------+--------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------+-------------+------------------+----------+--------+
| c2c34a0f-f641-4939-9c46-2df97964f6b0 | cirros | qcow2 | bare | 13147648 | active |
+--------------------------------------+--------+-------------+------------------+----------+--------+

The error is logged as INFO on api.log but user will not know why the image is not created.

2014-09-12 18:54:58.921 21663 INFO glance.api.common [-] User 2bcd197108b44efe84f3c5a19d40a716 attempted to upload an image of size 6442450945 that will exceeed the quota. 2 bytes remaining.
2014-09-12 18:54:58.923 21663 INFO glance.api.v1.upload_utils [-] Denying attempt to upload image because it exceeds the .quota: The size of the data 6442450945 will exceed the limit. 2 bytes remaining.
2014-09-12 18:55:01.980 21671 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.35.160.123
2014-09-12 18:55:02.152 21671 INFO glance.wsgi.server [25188ae9-2a1d-4791-b6ba-23051cb90e8b 2bcd197108b44efe84f3c5a19d40a716 8f8749df409d4bbab5d982384b0d6ab0 - - -] 10.35.160.123 - - [12/Sep/2014 18:55:02] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 200 671 0.175247

Changed in glance:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

In the above bug, error is not reported to client is because if copy-from is used then it starts new async process which downloads the image given in the copy-from option.
Please refer ​https://github.com/openstack/glance/blob/master/glance/api/v1/images.py#L756

As the size of the image is unknown when the --copy-from option is specified its not possible to calculate quota is sufficient or not.

One solution for this is can we make size mandatory for --copy-from option which will help to calculate quota before triggering the download.

Please suggest.

Revision history for this message
Cindy Pallares (cpallares) wrote :
Changed in glance:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.