Comment 3 for bug 1333119

Revision history for this message
Tzach Shefi (tshefi) wrote :

Hey Kent,

That's correct no error on image deletion, notice you were supposed to run that deletion command twice :)
See below step 3 to delete image (deleted no output), step 4 try to delete that same image you just deleted on step 3, only then do you get the misleading notice.

Glance version used:
openstack-glance-2014.1-4.el7ost.noarch
python-glanceclient-0.12.0-1.el7ost.noarch
python-glance-2014.1-4.el7ost.noarch

1. Uploaded an image
2. Image list to get it's ID

[root@puma31 ~(keystone_admin)]# glance image-list
+--------------------------------------+-------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-------------+-------------+------------------+-----------+--------+
| fa3406fa-ecef-44b8-a8e1-347203e40501 | twotwo | qcow2 | bare | 416309760 | active |
+--------------------------------------+-------------+-------------+------------------+-----------+--------+

3. Now delete that image, should work deleting the image as it should.

[root@puma31 ~(keystone_admin)]# glance image-delete fa3406fa-ecef-44b8-a8e1-347203e40501

4. Run exact same deletion command again, image delete will fail as no image is left to delete, yet notice reasoning.

[root@puma31 ~(keystone_admin)]# glance image-delete fa3406fa-ecef-44b8-a8e1-347203e40501
Request returned failure status.
404 Not Found
Image fa3406fa-ecef-44b8-a8e1-347203e40501 not found.
    (HTTP 404): Unable to delete image fa3406fa-ecef-44b8-a8e1-347203e40501

5. Now delete another image, this time use a fake none existing image ID

[root@puma31 ~(keystone_admin)]# glance image-delete fa3406fa-ecef-44b8-a8e1-347203e40522
Request returned failure status.
No image with a name or ID of 'fa3406fa-ecef-44b8-a8e1-347203e40522' exists.

My point being, compare outputs from steps 4 and 5.
Hope this clears things up.