Incorrect output in the console when you delete a non-existent image with glance client v2

Bug #1468336 reported by Alexey Galkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Unassigned

Bug Description

Bug:

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

Steps to reproduce:

1. Execute following command: glance image-create --name 'Test' --container-format bare --disk-format qcow2 --file <DOWNLOADED_IMAGE> --progress
2. Wait image to upload and take image <UPLOADED_IMAGE_ID>
3. Execute glance image-delete <UPLOADED_IMAGE_ID>
4. 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 ~]#

Changed in python-glanceclient:
status: New → Confirmed
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

This issue is already fixed in latest python-glanceclient code:
https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v1/shell.py#L367

Changed in python-glanceclient:
status: Confirmed → Invalid
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.