Shut down an instance, with potential to free up hypervisor resources

Registered by Andrew Laski

Based on the discussion summarized in https://etherpad.openstack.org/HavanaMothballServer

Users would like the ability to stop servers when they don't need them, but retain it in their list of servers and keep all associated data and resources with it. If an instance is stopped for a long while an operator may wish to move that instance off of the hypervisor in order to minimize resource usage.

In order to address a user who may wish to stop an instance at the end of a work day and resume it the following day/start of new week we're going to add a new shelved state and API operations to shelve/unshelve an instance. Shelving will be pretty much synonymous with shutting down an instance on the hypervisor, so anything in memory is not maintained. Unshelving will restart the instance.

If an instance has been shelved for some amount of time, say 72 hours(configurable), then a periodic task can begin freeing up hypervisor resources by possibly snapshotting the disk and offloading to 'cold storage' and removing the instance from its host. This has the potential to lengthen the unshelve time, so deployers will need to inform users. Perhaps a new state could be added to indicate that the instance no longer exists on a host, but that discussion can be had later.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Medium
Drafter:
Andrew Laski
Direction:
Approved
Assignee:
Andrew Laski
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Thierry Carrez
Completed by
Thierry Carrez

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/shelve-instance,n,z

Addressed by: https://review.openstack.org/34032
    Shelve/unshelve an instance

Addressed by: https://review.openstack.org/34033
    API for shelving

Addressed by: https://review.openstack.org/33275
    New select_destinations scheduler call

Addressed by: https://review.openstack.org/35361
    Periodic task for offloading shelved instances

(?)

Work Items