On Thu, Jul 13, 2017 at 11:37 AM, Chris Dent <cdent...@anticdent.org>
wrote:
On Thu, 13 Jul 2017, Balazs Gibizer wrote:
/placement/allocation_candidates?resources=CUSTOM_MAGIC%3A512%2CMEMORY_MB%3A64%2CVCPU%3A1"
but placement returns an empty response. Then nova scheduler falls
back to legacy behavior [4] 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:
https://github.com/openstack/nova/blob/master/nova/objects/resource_provider.py#L663-L678
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?
I updated my script with the trait. [3]
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:
https://review.openstack.org/#/c/460798/
What would be a good place to document this? I think I can help with
enhancing the documentation from this perspective.
Thanks again.
Cheers,
gibi
--
Chris Dent ┬──┬◡ノ(° -°ノ)
https://anticdent.org/
freenode: cdent tw: @anticdent
[3] http://paste.openstack.org/show/615629/
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev