[openstack-dev] [nova] [placement] aggregates associated with multiple resource providers

Chris Dent cdent+os at anticdent.org
Sun May 29 22:19:00 UTC 2016

I'm currently doing some thinking on step 4 ("Modify resource tracker
to pull information on aggregates the compute node is associated with
and the resource pools available for those aggregatesa.") of the
work items for the generic resource pools spec[1] and I've run into
a brain teaser that I need some help working out.

I'm not sure if I've run into an issue, or am just being ignorant. The
latter is quite likely.

This gets a bit complex (to me) but: The idea for step 4 is that the
resource tracker will be modified such that:

* if the compute node being claimed by an instance is a member of some
* and one of those  aggregates is associated with a resource provider 
* and the resource provider has inventory of resource class DISK_GB

then rather than claiming disk on the compute node, claim it on the
resource provider.

The first hurdle to overcome when doing this is to trace the path
from compute node, through aggregates, to a resource provider. We
can get a list of aggregates by host, and then we can use those
aggregates to get a list of resource providers by joining across
ResourceProviderAggregates, and we can join further to get just
those ResourceProviders which have Inventory of resource class

The issue here is that the result is a list. As far as I can tell
we can end up with >1 ResourceProviders providing DISK_GB for this
host because it is possible for a host to be in more than one
aggregate and it is necessary for an aggregate to be able to associate
with more than one resource provider.

If the above is true and we can find two resource providers providing
DISK_GB how does:

* the resource tracker know where (to which provider) to write its
   disk claim?
* the scheduler (the next step in the work items) make choices and
   declarations amongst providers? (Yes, place on that node, but use disk provider
   X, not Y)

If the above is not true, why is it not true? (show me the code

If the above is an issue, but we'd like to prevent it, how do we fix it?
Do we need to make it so that when we associate an aggregate with a
resource provider we check to see that it is not already associated with
some other provider of the same resource class? This would be a
troubling approach because as things currently stand we can add Inventory
of any class and aggregates to a provider at any time and the amount of
checking that would need to happen is at least bi-directional if not multi
and that level of complexity is not a great direction to be going.

So, yeah, if someone could help me tease this out, that would be
great, thanks.

[1] http://specs.openstack.org/openstack/nova-specs/specs/newton/approved/generic-resource-pools.html#work-items

Chris Dent               (╯°□°)╯︵┻━┻            http://anticdent.org/
freenode: cdent                                         tw: @anticdent

More information about the OpenStack-dev mailing list