Difference between revisions of "Glance-image-recover"
(→General Workflow) |
|||
Line 8: | Line 8: | ||
# User PUT <tt>/v2/images/{image-uuid}</tt> on the requested image to recover it | # User PUT <tt>/v2/images/{image-uuid}</tt> on the requested image to recover it | ||
# Eventually, the requested image should be in 'active' state after recovering successfully. | # Eventually, the requested image should be in 'active' state after recovering successfully. | ||
+ | |||
+ | == Design Details == | ||
+ | <pre> | ||
+ | HTTP Request - PUT /v2/images/12345678-1234-1234-1234-123456789abc | ||
+ | </pre> | ||
+ | <pre> | ||
+ | Response: 201 OK | ||
+ | { "status": "success", | ||
+ | "result" : { | ||
+ | "image_uuid": "deadbeef-dead-dead-dead-beefbeefbeef" | ||
+ | } | ||
+ | "expires_at": "2013-05-21T15:19:56+0000", | ||
+ | "id": "12345678-1234-1234-1234-123456789abc", | ||
+ | "input" : {... }, | ||
+ | /* etc */ | ||
+ | } | ||
== Known code impact == | == Known code impact == |
Revision as of 07:53, 20 November 2013
Overview
This proposal aims to recover an image which is in 'pending-delete' state so as to provide the revert capability for the purposes of allowing emergency operational action to recover from an accidental delete
General Workflow
- The 'delayed_delete' config entry is enabled in glance-api.conf
- Delete the specific image
- List the images which are 'pending-delete'
- User PUT /v2/images/{image-uuid} on the requested image to recover it
- Eventually, the requested image should be in 'active' state after recovering successfully.
Design Details
HTTP Request - PUT /v2/images/12345678-1234-1234-1234-123456789abc
Response: 201 OK { "status": "success", "result" : { "image_uuid": "deadbeef-dead-dead-dead-beefbeefbeef" } "expires_at": "2013-05-21T15:19:56+0000", "id": "12345678-1234-1234-1234-123456789abc", "input" : {... }, /* etc */ }Known code impact
1. List pending-delete image 2. Only allow 'active' image to be in 'pending-delete'
References