[openstack-dev] [nova][placement] scheduling with custom resouce classes
jaypipes at gmail.com
Mon Jul 17 16:40:30 UTC 2017
On 07/17/2017 11:31 AM, Balazs Gibizer wrote:
> On Thu, Jul 13, 2017 at 11:37 AM, Chris Dent <cdent+os at anticdent.org>
>> On Thu, 13 Jul 2017, Balazs Gibizer wrote:
>>> but placement returns an empty response. Then nova scheduler falls
>>> back to legacy behavior  and places the instance without
>>> considering the custom resource request.
>> As far as I can tell at least one missing piece of the puzzle here
>> is that your MAGIC provider does not have the
>> 'MISC_SHARES_VIA_AGGREGATE' trait. It's not enough for the compute
>> and MAGIC to be in the same aggregate, the MAGIC needs to announce
>> that its inventory is for sharing. The comments here have a bit more
>> on that:
> Thanks a lot for the detailed answer. Yes, this was the missing piece.
> However I had to add that trait both the the MAGIC provider and to my
> compute provider to make it work. Is it intentional that the compute
> also has to have that trait?
No. The compute node doesn't need that trait. It only needs to be
associated to an aggregate that is associated to the provider that is
marked with the MISC_SHARES_VIA_AGGREGATE trait.
In other words, you need to do this:
1) Create the provider record for the thing that is going to share the
2) Create an inventory record on that provider
3) Set the MISC_SHARES_VIA_AGGREGATE trait on that provider
4) Create an aggregate
5) Associate both the above provider and the compute node provider with
That's it. The compute node provider will now have access to the
CUSTOM_MAGIC resources that the other provider has in inventory.
> I updated my script with the trait. 
>> It's quite likely this is not well documented yet as this style of
>> declaring that something is shared was a later development. The
>> initial code that added the support for GET /resource_providers
>> was around, it was later reused for GET /allocation_candidates:
> What would be a good place to document this? I think I can help with
> enhancing the documentation from this perspective.
> Thanks again.
>> Chris Dent ┬──┬◡ﾉ(° -°ﾉ) https://anticdent.org/
>> freenode: cdent tw: @anticdent
>  http://paste.openstack.org/show/615629/
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
More information about the OpenStack-dev