Use conductor in the servicegroup db driver.

This patch updates the servicegroup db driver to use the conductor API
in the cases where it was accessing the db directly before.  If the
service is allowed to do direct db access, the conductor API will
optimize the call to go straight to the db.  Otherwise, it will invoke
rpc to a remove conductor service to perform the operations.

Part of bp no-db-compute.

Change-Id: I96adffc6f80288c829d84f170414613a35b5c840
This commit is contained in:
Russell Bryant
2013-01-14 18:33:14 -05:00
parent 57aaf62fb0
commit e48ad486ff

View File

@@ -411,7 +411,7 @@ class Service(object):
self.db_allowed = db_allowed
self.conductor_api = conductor.API(use_local=db_allowed)
self.conductor_api.wait_until_ready(context.get_admin_context())
self.servicegroup_api = servicegroup.API()
self.servicegroup_api = servicegroup.API(db_allowed=db_allowed)
def start(self):
verstr = version.version_string_with_package()