Incorrect output in the console when you delete a non-existent image

Bug #1468334 reported by Alexey Galkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
Medium
MOS Glance

Bug Description

Using iso #521.

Bug:

When you delete a nonexistent image in the console returns html error code (404).

Steps to reproduce:

1. Deploy Juno on CentOS 6.5.
2. Go to controller node with SSH and use . openrc.
3. Execute following command: glance image-create --name 'Test' --container-format bare --disk-format qcow2 --file <DOWNLOADED_IMAGE> --progress
4. Wait image to upload and take image <UPLOADED_IMAGE_ID>
5. Execute glance image-delete <UPLOADED_IMAGE_ID>
6. Repeat execute the previous command of glance: image-delete <UPLOADED_IMAGE_ID>

Example output:

[root@node-8 ~]# glance image-create --name 'Test' --container-format bare --disk-format qcow2 --file cirros-0.3.0-x86_64-disk.img --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 50bdc35edb03a38d91b1b071afb20a3c |
| container_format | bare |
| created_at | 2015-06-24T12:31:38 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | cbf27de9-781d-44e8-ab60-aa1f6c09997c |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | Test |
| owner | 70d78a337a78429792d797e43c7a68aa |
| protected | False |
| size | 9761280 |
| status | active |
| updated_at | 2015-06-24T12:31:39 |
| virtual_size | None |
+------------------+--------------------------------------+
[root@node-8 ~]# glance image-delete cbf27de9-781d-44e8-ab60-aa1f6c09997c
[root@node-8 ~]# glance image-delete cbf27de9-781d-44e8-ab60-aa1f6c09997c
<html>
 <head>
  <title>404 Not Found</title>
 </head>
 <body>
  <h1>404 Not Found</h1>
  Image cbf27de9-781d-44e8-ab60-aa1f6c09997c not found.<br /><br />

 </body>
</html> (HTTP 404): Unable to delete image cbf27de9-781d-44e8-ab60-aa1f6c09997c
[root@node-8 ~]#

Alexey Galkin (agalkin)
tags: added: python-glanceclient
removed: glance
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :
Changed in mos:
importance: Undecided → Medium
assignee: nobody → MOS Glance (mos-glance)
status: New → Confirmed
Revision history for this message
Mike Fedosin (mfedosin) wrote :

Fixed in client 0.16.0 https://review.openstack.org/#/c/140988/ Merged in MOS 7.0

Changed in mos:
status: Confirmed → Fix Committed
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Fix verified on MOS 7.0 ISO #288 RC2:

root@node-1:~# . openrc
root@node-1:~# glance image-create --name 'Test' --container-format bare --disk-format qcow2 --file cirros-0.3.4-x86_64-disk.img --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2015-09-10T08:37:02.000000 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | ffb672c8-b4d0-49b8-832d-049b8cb1fee6 |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | Test |
| owner | 16397292db904715a64b493104292b86 |
| protected | False |
| size | 13287936 |
| status | active |
| updated_at | 2015-09-10T08:37:04.000000 |
| virtual_size | None |
+------------------+--------------------------------------+
root@node-1:~# glance image-list
+--------------------------------------+--------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------+-------------+------------------+----------+--------+
| ffb672c8-b4d0-49b8-832d-049b8cb1fee6 | Test | qcow2 | bare | 13287936 | active |
| d12f777d-6b19-403e-9cd8-8fd565f58398 | TestVM | qcow2 | bare | 13287936 | active |
+--------------------------------------+--------+-------------+------------------+----------+--------+
root@node-1:~# glance image-delete ffb672c8-b4d0-49b8-832d-049b8cb1fee6
root@node-1:~# glance image-delete ffb672c8-b4d0-49b8-832d-049b8cb1fee6
No image with an ID of 'ffb672c8-b4d0-49b8-832d-049b8cb1fee6' exists
root@node-1:~#

Changed in mos:
status: Fix Committed → 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.