[openstack-dev] Dynamically adding Extra Specs
Jay Pipes
jaypipes at gmail.com
Fri Jan 22 13:47:49 UTC 2016
Hi! Comments inline...
On 01/22/2016 01:26 AM, Dhvanan Shah wrote:
> Hi,
>
> I had a few queries regarding adding extra specs for VM requests.
>
> According to my understanding if I want to add extra specs to requests
> then I need to change that in different flavors adding those
> capabilities by setting them in the flavors. But if the requests that I
> get have varying values for those extra capabilities then it seems to
> create an issue as the values in the flavors are static. Please correct
> me if I'm wrong.
Right, flavors are static blobs of both resources (amounts of things
requested by the user) and capabilities (free-form key/value pairs in
extra_specs). For every variation you may want to offer your cloud
users, you need to create a new flavor in the system, and your cloud
users must select that flavor when booting a VM.
Don Dugger from Intel has called this problem "flavor explosion", which
I have comically re-labeled "the Skittles problem". We have a long-term
plan to allow for the ability to list a set of capabilities present in
the deployment and allow a cloud user to "mix and match" resource
amounts and required capabilities in a more flexible way, but that work
is likely 9-12 months out in reality.
> So I wanted to know as to how I could dynamically add those extra specs
> best suiting each request. Is there a way of mentioning the extra specs
> everytime I spawn a VM through the nova cli? Setting and unsetting the
> extra specs everytime I spawn VM's according to my need would be quite
> inefficient as it makes changes to the database.
Yes, it is a clunky and inflexible API right now, I agree. The genesis
of the flavor concept comes from Rackspace Cloud Servers, which modeled
its flavor concept on the Amazon EC2 instance types concept. This model
works well for public clouds, because a) they use the flavor as a
stock-keeping unit (SKU) so therefore this system makes billing easier,
and b) it reduces the number of hardware configuration options that
public cloud operators need to provide at scale to users.
If you are interested in this area, follow conversations and blueprints
with the terms "flavor decomposition", "host capabilities", and
"resource representation".
Best,
-jay
More information about the OpenStack-dev
mailing list