[openstack-dev] [nova][placement] scheduling with custom resouce classes

Balazs Gibizer balazs.gibizer at ericsson.com
Thu Jul 13 06:25:04 UTC 2017


Dear Placement developers,

I'm trying to build on top of the custom resource class implementation 
[1][2] from the current master [3]. I'd like to place instances based 
on normal resources (cpu, ram) and based on a custom resource I will 
call MAGIC for this discussion. So far I managed to use the placement 
API to define the CUSTOM_MAGIC resource, create a provider and report 
some inventory of MAGIC from that provider. Then I added the 
'resources:CUSTOM_MAGIC=512' to the flavor's extra_specs. During server 
boot the scheduler builds a seemingly good placement request "GET 
/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.

Then I tried to connect the compute provider and the MAGIC provider to 
the same aggregate via the placement API but the above placement 
request still resulted in empty response. See my exact steps in [5].

Do I still missing some environment setup on my side to make it work?
Is the work in [1] incomplete?
Are the missing pieces in [2] needed to make this use case work?

If more implementation is needed then I can offer some help during 
Queens cycle.

To make the above use case fully functional I realized that I need a 
service that periodically updates the placement service with the state 
of the MAGIC resource like the resource tracker in Nova. Is there any 
existing plans creating a generic service or framework that can be used 
for the tracking and reporting purposes?

Cheers,
gibi


[1] 
https://review.openstack.org/#/q/topic:bp/custom-resource-classes-pike
[2] 
https://review.openstack.org/#/q/topic:bp/custom-resource-classes-in-flavors
[3] 0ffe7b27892fde243fc1006f800f309c10d66028
[4] 
https://github.com/openstack/nova/blob/48268c73e3f43fa763d071422816942942987f4a/nova/scheduler/manager.py#L116
[5] http://paste.openstack.org/show/615152/






More information about the OpenStack-dev mailing list