Clearer error message when deleting a protected image

Bug #1597478 reported by Rafael Rivero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

It would be more helpful to provide a clearer error message when deleting an image that is set to 'Protected' - that it can not be deleted, while displaying the unset commands through the CLI clients, and navigational directions through Horizon.

Horizon
Error: You are not allowed to delete image: cirros

openstackclient
ERROR: openstack 403 Forbidden: Image is protected (HTTP 403)

Changed in glance:
assignee: nobody → Akhila Kishore (akhila-kishore)
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Marking as invalid. The response from the Images v2 API is:

demo! curl -i -X DELETE -H "x-auth-token: $TK" $OS_IMAGE_URL/v2/images/6d015b0f-c117-4571-b678-be8f74a03cc1
HTTP/1.1 403 Forbidden
Date: Wed, 31 Jan 2018 21:06:26 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 200
Content-Type: text/html; charset=UTF-8
x-openstack-request-id: req-4652129e-f5c1-4ed8-aca8-33bd2cdb9a9e
Connection: close

<html>
 <head>
  <title>403 Forbidden</title>
 </head>
 <body>
  <h1>403 Forbidden</h1>
  Image 6d015b0f-c117-4571-b678-be8f74a03cc1 is protected and cannot be deleted.<br /><br />

 </body>
</html>

This seems pretty clear. If you don't like the way Horizon or one of the clients handles this response, please file the bug against them. Thanks!

Changed in glance:
assignee: Akhila Kishore (akhila-kishore) → nobody
status: New → 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.