Jump to: navigation, search

Blueprint-nova-planned-resource-reservation-api

Revision as of 22:48, 14 April 2013 by Ppetit (talk | contribs)
  • Created: Julien Danjou
  • Contributors: Julien Danjou, Patrick Petit, François Rossigneux, Julien Carpentier

Summary

This blueprint introduces the concept of a Capacity Leasing Service for OpenStack. With that service, a user can create a lease of hardware resources that are dedicated to the sole use of a tenant. A lease is a negotiation agreement between the provider and the consumer where the former agrees to make a set of hardware resources (computer and possibly storage) available to the latter, based on a set of lease terms presented by the consumer. The lease terms should include the description of the capacity needs and the availability period during which the hardware is reserved.

We are thinking of three kinds of lease terms:

  • Schedule: where the resources must be available at a specific date and time
  • Best-effort: where the resources are provisioned as soon as possible
  • Immediate: where resources are provisioned immediately or not at all

Once a lease is granted, nobody but the users of the tenant can use the reserved hardware. When a lease ends, nothing disruptive happens to the instances that have been scheduled on the reserved hardware. The hardware resources simply return to the common pool and so become available to other tenants. A lease can be billable item for which VMs can be charged for a premium price or flat fee and so usage should be logged through.

See Launchpad Blueprint: Planned resource reservation API

Rationale

In the request, the user specifies the properties of the lease:

  1. region
  2. availability zone
  3. cell?
  4. required hosts capabilities,
  5. minimum number of nodes,
  6. no-latter-than starting date
  7. duration in number of days and hours

In return, the service displays a list of lease handles (sorted in chronological order) containing a schedule proposals (starting date and time), and other optional (provider's specific?) parameters. The user can then create, and so activate the lease, using one of the lease handles he obtained from the previous step.


More Advanced Use Cases

More advanced usage scenarios will be enabled through the use of plug-able modules to backend systems that will affect the content of the lease handles returned by the service. Beyond reserving capacity, the expected benefits of the Capacity Leasing Service is to foster energy efficiency (greener?) behaviors through promoting nodes with the lowest MFLOPS/Watt ratio, or save electricity by automatically turning machines on and off based on the leasing schedule. In addition, the service should help operators with the management of their physical assets in a more effective way thanks to the enablement of capacity planing and automated fulfillment processes based again on the leasing schedule.

Last but not least. The Capacity Leasing Service is also expected to address a class of performance needs and types of workload that are typical of the high performance computing world, whereby applications require to be executed on dedicated nodes of similar hardware specification and speed (CPU arch, model, and clock frequency)

As a result, capacity leasing requests to the service should allow users to specify host capabilities parameters criteria that are compatible, or even the same, as those used by the ComputeCapabilitiesFilter which are known as the instance type extra specifications.

For exemple:

  • memory_mb == 22000
  • vcpus == 8
  • local_gb == 1690
  • cpu_arch == "x86_64"
  • cpu_info == '{"model":"Nehalem", "features":["tdtscp", "xtpr"]}'
  • xpu_arch = "fermi"
  • xpus = 2
  • xpu_info ='{"model":"Tesla 2050", "gcores":"448"}'
  • net_arch = "ethernet"
  • net_info = '{"encap":"Ethernet", "MTU":"8000"}'
  • net_mbps = 10000
  • hypervisor_ype == QEMU

As for the ComputeCapabilitiesFilter, the extra specification parameters used by the Capacity Leasing Service should support an operator at the beginning of the value string of a key/value pair. If there is no operator specified, then a default operator of ‘s==’ is used.

As a recap, valid operators are:

  • = (equal to or greater than as a number; same as vcpus case)
  • == (equal to as a number)
  •  != (not equal to as a number)
  • >= (greater than or equal to as a number)
  • <= (less than or equal to as a number)
  • s== (equal to as a string)
  • s!= (not equal to as a string)
  • s>= (greater than or equal to as a string)
  • s> (greater than as a string)
  • s<= (less than or equal to as a string)
  • s< (less than as a string)
  • <in> (substring)
  • <or> (find one of these)

Examples are: ">= 5", "s== 2.1.0", "<in> gcc", and "<or> fpu <or> gpu"

Design

A reservation, or lease, is tight to a project. It has a start and an end timestamp, during which the lease is valid. It also has a number of nodes and their flavors associated with, so it can be quantified. A lease has a set of scheduler hints set that are immutable. An API call allows a user to retrieve the list and combination of applicable hints. When a user tries to creates a lease, the list of scheduler hints is checked for validity: an operator can refuse a lease with invalid or too strict hints.

When an instance is created, it's registered as being part of the lease when the user passes the information at creation time. It's taken from the lease when it's destroyed. If an instance is created as being part of a lease, the scheduler has to launch the instance with the requirements fulfilled.

Nova-reservation-design.png
Flow-design.png

Implementation

TBD

Test Plan

TBD