Jump to: navigation, search

Glance-image-recover

Revision as of 08:05, 20 November 2013 by Fei Long Wang (talk | contribs) (Design Details)

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

  1. The 'delayed_delete' config entry is enabled in glance-api.conf
  2. Delete the specific image
  3. List the images which are 'pending-delete'
  4. User PUT /v2/images/{image-uuid} on the requested image to recover it
  5. 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: 200 OK
{
"status":"active",
"name":"cirros-0.3.1-x86_64-uec",
"tags":[
],
"kernel_id":"be50418b-a03c-4947-9122-b80a57f47ac4",
"container_format":"ami",
"created_at":"2013-11-19T08:42:14Z",
"ramdisk_id":"e1256074-9f7b-4067-8356-4a5759c1db11",
"disk_format":"ami",
"updated_at":"2013-11-19T08:42:16Z",
"visibility":"public",
"self":"/v2/images/26c16e07-24ca-4abc-a523-bec068012363",
"protected":false,
"id":"26c16e07-24ca-4abc-a523-bec068012363",
"file":"/v2/images/26c16e07-24ca-4abc-a523-bec068012363/file",
"checksum":"f8a2eeee2dc65b3d9b6e63678955bd83",
"min_disk":0,
"size":25165824,
"min_ram":0,
"schema":"/v2/schemas/image"
}

Known code impact

1. List pending-delete image
2. Only the image which in 'active' status can be recovered to 'pending-delete'

References