Clearer error message when deleting a protected image
Bug #1597478 reported by
Rafael Rivero
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) |
To post a comment you must log in.
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-be8f74a03c c1 request- id: req-4652129e- f5c1-4ed8- aca8-33bd2cdb9a 9e
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-
Connection: close
<html> c117-4571- b678-be8f74a03c c1 is protected and cannot be deleted.<br /><br />
<head>
<title>403 Forbidden</title>
</head>
<body>
<h1>403 Forbidden</h1>
Image 6d015b0f-
</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!