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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user