Instance Disk Management

Registered by Paul Voccio

Background and Context
---------------------

At a high level, the idea is to create a setting for images and instances that track whether a tenant will manage his own file systems and partitions or if Nova will handle that for them. If the managed disk setting is on, then we will automatically perform some basic tasks like expanding or shrinking their filesystem when doing a resize. We received strong feedback that removing certain automated disk management functions (resizing, portioning, etc.) would negatively impact the customer experience for less technical Openstack users.

The overall goals are:

Support automatic resize of disk for Linux and Windows customers who desire simplicity
Support custom partition schemes and file systems for Linux and Windows customers who desire control
Support resize down where possible
As much as possible, any image launchable on any flavor (unless a minflavor size is set)
Single, standard well-defined cloud servers image format to enable image market place, portability, glance federation, bundling, etc.
Rapid deployment of images
Efficient full VM image creation that work for ALL flavors with no or reasonable limits on frequency
Ability to coordinate image creation with guest disk quiescing
Conceptually consistent with attaching external CBS volumes
It has been decided to use the use the terminology Auto for automatically managed disk and Manual for non-managed disks.

Functional Description
--------------------
Standardize on a Rackspace Cloud Files image format consisting of an OVA container with a single VHD inside
Note that swap is a separate VHD that is not stored within the OVA container
Create a setting for images that dictates whether instances created from that image are to have Auto or Manual disk management (may need separate card for image/glance)
Create a setting for instances that dictate whether the specific instance is to have Auto or Manual disk management
Create a default setting for images and instances that is for Auto
Change Linux instance creation so that guest configuration, agent and xentools are injected on boot (config-disk?)
Instances should inherit the Auto or Manual setting of the image from which it is built
Images should inherit the Auto or Manual setting of the instance from which they are created
Create an API extension that enables a customer or admin to change the managed disk setting for an image
Create an API extension that enables a customer or admin to change the managed disk setting for an instance
An instance that is built from images set to Auto should have the filesystem automatically expanded to use the full disk space available
This capability should also be enabled for Windows 2008 images - agent should look for available space and expand the partition
An instance that is built from an image that is set to Manual should only contain the same partition that is in the base image
An instance that is resized to a larger flavor and is set to Auto should have the filesystem automatically expanded to use the full disk available
This capability should also be enabled for Windows 2008 images - agent should look for available space and expand the partition
- An instance that is resized but but set to Manual would show unpartitioned space. Nothing would change from their previous filesytem setup
Linux instances that are set to Auto should be able to resize down and have the VHD shrunk accordingly #5457
This should only work if there isn't more data in the instance's file system than can be handled on the new, smaller flavor
Windows customers will not have resize down at this time
Linux set to Manual would not be able to resize down automatically

Acceptance Criteria
-----------------
A linux image with managed disk on will be used to create a 1GB instance. The file system should occupy all available space
This instance will be resized to a 2GB instance. The filesystem should be automatically extended
This instance will be resized to a 512MB instance. The resize should complete successfully with the filesystem occupying the available space.
Filesystem data will be added to the instance so that it consumes more than 50% of the available space. The instance will be resized down to a 256MB instance. The operations should fail because the VHD will not fit the available data.

A Windows instance will be created from a managed disk image with a 2GB flavor. The filesystem should occupy the available space.
This instance will be resized to a 4GB instance. This should be completed successfully and the filesystem should occupy the available space.
This instance will be resized down to a 1GB instance. This operation should fail.

A linux image with managed disk disabled will be used to create a 1GB instance. This instance should come up with only a 10GB(verify?) filesystem/partition with the remaining space unpartitioned.
This image will be resized up to a 2GB instance. This should complete successfully but the image should have a 10GB filesystem with the remaining space unpartitioned.
This image will be resized down to a 1GB instance. This operation should fail.

Notes
-----
The terminology around Managed Disk will likely change.

Blueprint information

Status:
Complete
Approver:
Vish Ishaya
Priority:
Medium
Drafter:
Nova Feature Parity Team
Direction:
Approved
Assignee:
Nova Feature Parity Team
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Vish Ishaya

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.