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:
Dan Smith 2013-01-14 12:44:32 -05:00
parent b709a9a808
commit 25f3149070

View File

@ -309,7 +309,8 @@ class ResourceTracker(object):
def _get_service(self, context):
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:
LOG.warn(_("No service record for host %s"), self.host)