[openstack-dev] [nova] Update on resource providers work

Jay Pipes jaypipes at gmail.com
Wed Jun 8 20:36:20 UTC 2016


On 06/08/2016 03:52 PM, Sean Dague wrote:
> On 06/08/2016 03:31 PM, Matt Riedemann wrote:
>> On 6/6/2016 7:26 AM, Jay Pipes wrote:
>>> Once the InventoryList and AllocationList objects are merged, then we
>>> will focus on reviews of the placement REST API patches [3]. Again, we
>>> are planning on having the nova-compute resource tracker call these REST
>>> API calls directly (while continuing to use the Nova ComputeNode object
>>> for saving legacy inventory information). Clearly, before the resource
>>> tracker can call this placement REST API, we need the placement REST API
>>> service to be created and a client for it added to OSC. Once this client
>>> exists, we can add code to the resource tracker which uses it.
>>
>> Wait, we're going to require python-openstackclient in Nova to call the
>> placement REST API? That seems bad given the dependencies that OSC pulls
>> in. Why not just create the REST API wrapper that we need within Nova
>> and then split that out later to whichever client it's going to live in?
>
> Yes, that ^^^
>
> Just use keystoneauth1 and hand rolled json. We shouldn't be talking
> about a ton of code.
>
> Pulling python-openstackclient back into Nova as a dependency is really
> a hard NACK for a bunch of reasons, including the way dependencies work.

Ack.

It looks like actually we're going to be able to do much of the initial 
pass using objects (that *only* communicate with the API database, not 
the cell DB) and transition to that being REST API calls after some time.

In code, what we're planning is to temporarily have the resource tracker 
instantiate a nova.objects.ResourceProvider object and call that 
object's set_inventory() method which communicates *only* with the API 
database and writes records to the inventories table. The resource 
tracker would continue to write inventory fields to the legacy locations 
(e.g. compute_nodes.memory_mb) for some period of time.

Later on, we'll change the resource tracker to call the placement API 
directly (via a keystoneauth + JSON over HTTP approach) and then long 
term figure out a small-dependency library import that would wrap the 
keystoneauth + JSON over HTTP calls.

The set_inventory() patch, for the record, is up for review here:

https://review.openstack.org/#/c/326440/

Reviews welcome ;)
-jay



More information about the OpenStack-dev mailing list