API: Allow user to specify image to use during rescue

Registered by Aditi Raveesh

Current workflow:
When a rescue is done on an instance, the image_base_ref in the instance_meta_data is used.
In the case where this attribute is not populated, the custom image_ref is used instead.

Problem faced:
The custom image used might be corrupt, leading to errors, or too large, leading to timeouts.
Also, if the base image is deleted, the image ref on the instance_system_metadata will be invalid, leading to the rescue operation failing.

The user should be allowed to specify which image is to be used for rescue. (could be a default base image or a custom image).

Sample API for specifying image to be used to rescue an instance:

POST: /v2/d1b123/servers/7d14f8123/action -d '{"rescue": {"rescue_image_ref": "a88ddc123"}}'

This would use image with ref "a88ddc123" to rescue instance with uuid "7d14f8123"

Scenarios:
Case 1: If image_ref is specified as part of the rescue request, that image will be used.
Case 2: If image_ref is not specified as part of the rescue request, image_base_image_ref on the system_metadata of the instance will be used. (Default behavior)

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Low
Drafter:
Aditi Raveesh
Direction:
Approved
Assignee:
Aditi Raveesh
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
John Garbutt
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

This makes sense to me, especially to account for the case of a base image being deleted. I think a default base image based on os_type is out of scope for what you've described. If you amend this to just be about optionally passing in an image for rescue I'm ok with this. --alaski
I agree, seems like the scope has been reduced now, approving --johnthetubaguy

Gerrit topic: https://review.openstack.org/#q,topic:bp/allow-image-to-be-specified-during-rescue,n,z

Addressed by: https://review.openstack.org/62314
    Allow user to specify image to use during rescue

Addressed by: https://review.openstack.org/78140
    Allow user to specify image to use during rescue - V2 API changes

Apologies, this missed the deadline for Feature Freeze. Please rebase patches as soon as Juno opens, and we will try to get this in during that period. --johnthetubaguy (5th March 2014)

Addressed by: https://review.openstack.org/78180
    Allow user to specify image to use during rescue - V3 API changes

Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)

Addressed by: https://review.openstack.org/82991
    Proposed blueprint to allow image to be passed during rescue.

This now has an approved nova-spec, and code up for review. It can probably be targeted for Juno-1 and approved. --johnthetubaguy

Merged patches
============

Addressed by: https://review.openstack.org/62314
    Allow user to specify image to use during rescue

Addressed by: https://review.openstack.org/78140
    Allow user to specify image to use during rescue - V2 API changes

Patches to review...
================

Addressed by: https://review.openstack.org/78180
    Allow user to specify image to use during rescue - V3 API changes

Bumping to j-2 because not all code has merged in time for j-1. --mikalstill (11th June 2014)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.