API: Evacuate instance to a scheduled host

Registered by Anuj Mathur on 2013-04-03

In the event of a unrecoverable hardware failure, support needs to relocate an instance to another compute so it can be rebuilt.

The API call should locate a suitable host within the same cell (using nova-scheduler), and perform an update of the instance's location to the new host (similar to a rebuild).

This call should only be available to users with the Admin role.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Leandro Ignacio Costantino
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
Russell Bryant on 2013-04-24
Completed by
John Garbutt on 2014-07-22

Related branches

Whiteboard

Review comments:

Thank you for a good description of why this is useful. But please add more detail into this blueprint around the API and how you plan to change it --johnthetubaguy

Changes:

Gerrit topic: https://review.openstack.org/#q,topic:bp/find-host-and-evacuate-instance,n,z

Addressed by: https://review.openstack.org/25991 ( This has been abandoned )
    Evacuate instance to a scheduled host

<russellb> it's blocked because it depends on query-scheduler, which isn't done yet

Addressed by: https://review.openstack.org/38198
    Evacuate instance to a scheduled host

Addressed by: https://review.openstack.org/54670
    Evacuate instance to a scheduled host

Addressed by: https://review.openstack.org/56146
    Adding conductor task api for rebuild instance flow.

Addressed by: https://review.openstack.org/56197
    Consume rebuild instance conductor task.

Addressed by: https://review.openstack.org/56320
    Evacuate instance to a scheduled host.

Wow, there are many patches related to "Evacuate instance to a scheduled host", which one shall we proceed? I noticed that all of the patches are now abandoned. --jay-lau-513

I would like to help on this BP, please let me know if we still want this in IceHouse --leandro-i-costantino

-----------------------------------------------------------------
New set of reviews replacing older ones. (lcostantino)
-----------------------------------------------------------------
#1 https://review.openstack.org/#/c/56146/
    Title: Adding conductor task api for rebuild instance flow
    Desc: Move calls to conductor, and keep the current flow. Should not impact on current behavior.

#2 https://review.openstack.org/#/c/56197/
     Title: Add find host logic on rebuild_instance.
     Desc: Add logic to find host on conductor manager. Ideally this patch should not impact current behavior yet, since host parameter is still checked on the API.

#3 https://review.openstack.org/#/c/56320/
   Title: Add API support to make host optional on evacuate.)
   Desc: Add a new api v2 extension

#4 https://review.openstack.org/#/c/76853/
Title: Add api v3 support

Nova Client patches are ready also.

v3: https://review.openstack.org/#/c/76859/
v2: https://review.openstack.org/#/c/75025/
As a side note, this is the same evacuate api, but it's triggered when the host field is not present in the request.

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)

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

Addressed by: https://review.openstack.org/84429
    Allow evacuation without target host

Nova spec is approved, code is up, but no target, so targeting for Juno 1 --johnthetubaguy (28th April 2014)

OK, now thats all done, blueprint approved. --johnthetubaguy (28th April 2014)

Changes ready for review, marking as "NeedsCodeReview" --johnthetubaguy (28th April 2014)

Remaining patches
===============

Addressed by: https://review.openstack.org/88466
    Move rebuild to conductor and add find host logic

Addressed by: https://review.openstack.org/88749
    Add APIv2 support to make host optional on evacuate.

Addressed by: https://review.openstack.org/88750
    Add APIv3 support to make host optional on evacuate.

This did not get reviewed and approved in time :( moving to juno-2 --johnthetubaguy 10 June 2014

This should make Juno-2. All changes now approved, just final push left --johnthetubaguy 21 July 2014

All of these changes are now merged. Does this mean this BP is now fully implemented? --mikalstill 22 July 2014

Only nova-client patches remain, so we can call this complete for nova, I think. --johnthetubaguy 22 July 2014

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.