Support flavor with no local disks

Registered by Tom Patzig

Feature: Add no local_disks option to flavors

We need the possibilty to add a flavor with no local disks.
Which will result in no ephemeral (root) disk(s) on the hypervisor.

Currently, when creating a flavor with root disk size 0 the fallback is the size of the image, that gets created as block_device on the hypervisor. Therefore a new boolean parameter 'local_disks' (default to True) will be added to support no (root) disks locally on the hypervisor.

Background:

We do not want to have ephemeral disks locally on the hypervisor; not on a local filesystem nor on a share mounted to /var/lib/nova/instances.
Because, as that shares grows, they get unmaintainable and performance is getting worse.
On a local hypervsisor filesystem is also not always a good idea, because there are consumers, that do have data in the root disk as well, which sometimes cannot be simply thrown away.
For best flexibility and manageability we ideally want to have all disks as volumes.

We want to create a flavor, were we set local_disks=False. This flavor prevents consumers from creating instances with HV local block-devices. Users are then somehow forced to previously create a boot volume or to add the additional
block-device paramter with dest_type 'volume' upon their 'nova boot' request, to have a volume created.

For some customers we explicitly want to forbid using ephemeral storage at all.
In these environments (domains and/or projects) only flavors with local_disks=False will exist.

This change will add support for 'local_disk' to nova flavors.
Booting instances with that flavor, without providing a bootable volume, will fail early.

Blueprint information

Status:
Started
Approver:
John Garbutt
Priority:
Low
Drafter:
Tom Patzig
Direction:
Needs approval
Assignee:
Tom Patzig
Definition:
Pending Approval
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Matt Riedemann

Related branches

Sprints

Whiteboard

SPEC: https://review.openstack.org/#/c/267673/
http://specs.openstack.org/openstack/nova-specs/specs/newton/approved/flavor-root-disk-none.html

Gerrit topic: https://review.openstack.org/#q,topic:bp/flavor-root-disk-none,n,z

Addressed by: https://review.openstack.org/267673
    Add "disable local disks" option to flavors

Addressed by: https://review.openstack.org/280301
    Add option to disable local disks in flavors

Addressed by: https://review.openstack.org/331632
    Add option to disable local disks in flavors [2/3]

Addressed by: https://review.openstack.org/331633
    Add option to disable local disks in flavors [3/3]

This still has outstanding changes and we're now at non-priority blueprint
feature freeze for Newton. -- mriedem 20160630

Addressed by: https://review.openstack.org/373054
    Add "disable local disks" option to flavors

We're now past the feature freeze for Ocata so I've unapproved this. The spec will need to be re-proposed for Pike if someone plans on continuing this work. -- mriedem 20170128

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.