Make resource tracker use conductor for listing compute nodes
This makes the resource tracker use the existing conductor method of service_get_all_compute_by_host() instead of querying the database directly. Related to blueprint no-db-compute Change-Id: Iee19eeaa8651e4df0abb974f3f3ddeafd9d23409
This commit is contained in:
parent
b709a9a808
commit
25f3149070
@ -309,7 +309,8 @@ class ResourceTracker(object):
|
|||||||
|
|
||||||
def _get_service(self, context):
|
def _get_service(self, context):
|
||||||
try:
|
try:
|
||||||
return db.service_get_by_compute_host(context, self.host)
|
return self.conductor_api.service_get_by_compute_host(context,
|
||||||
|
self.host)
|
||||||
except exception.NotFound:
|
except exception.NotFound:
|
||||||
LOG.warn(_("No service record for host %s"), self.host)
|
LOG.warn(_("No service record for host %s"), self.host)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user