2 Commits

Author SHA1 Message Date
Matt Riedemann
a6ad102c9d Update placement config reno
This addresses some review comments from when this reno
was added, namely (1) that you have to restart nova-compute
to try and get a connection to the placement API if the initial
connection fails due to the service catalog not having a placement
entry, and (2) that the [placement] section in nova.conf has the
usual keystone auth options for connecting to the placement API.

Part of blueprint generic-resource-pools

Change-Id: I27c63df6753bcc89ce6866cd4d20952b664fced9
2016-08-31 11:57:17 -04:00
Jay Pipes
5fb6f8f511 rt: ensure resource provider records exist from RT
This patch adds functionality to the scheduler "report client" to ensure
that the client calls the placement API to create a resource provider
record for the local compute host managed by the Nova resource tracker.

The report client keeps a cache of resource provider objects, keyed by
resource provider UUID and constructed from the results of placement
REST API calls to get information about a resource provider. If a
resource provider matching a UUID was not found in the placement REST
API, the report client automatically creates the resource provider
record via the placement REST API. These resource provider objects will
be used in followup patches that add creation of inventory and
allocation records to the scheduler report client.

Included in this patch is a new [placement] nova.conf configuration
section with a single os_region_name configuration option that allows
Nova to grab the placement API endpoint URL for the particular OpenStack
region that it is in. We do not support endpoint URL overrides for the
placement API service. We only use the Keystone service catalog for
finding the endpoint for the placement service. We intentionally modeled
the determination of the placement endpoint URL after similar code that
determines the volume endpoint URL in /nova/volume/cinder.py.

This redoes the placement API using keystone session, and stubs out
where we can do more reasonable handling of errors. This works if we
fill out the right credentials in the placement section of the config
file.

Co-Authored-By: Sean Dague <sean@dague.net>

Change-Id: I9d28b51da25c523d22c373039e6d8b36fd96eba6
blueprint: generic-resource-pools
2016-08-31 11:14:03 +00:00