Allow multiple API services to single manager
It is assumed we should only run a single manager, which ideally can be failed over to run on any of the three controllers in a simple HA setup. However, the API is currently targeting the manager with a matching value for CONF.host. So if you run a single manager process, you must run a single API service on the same host. Currently the RPC target always includes the local hostname in its target. If we remove that, we instead target the host agnostic queue, similar to nova-conductor and nova-scheduler. This means three APIs can target the single running manager process. NOTE: the manager still has its target include its CONF.host value correctly, such that all the usual RPC queues are setup, but for now we stop using the host specific queue. Change-Id: Id78662b996e1a2d1820d86444428dc0e34f084fb
This commit is contained in:
parent
c80d519998
commit
57eda87875
@ -29,6 +29,12 @@ RPC_API_VERSION = '1.0'
|
||||
|
||||
|
||||
def get_target():
|
||||
return messaging.Target(topic=CONF.manager.rpc_topic,
|
||||
version=RPC_API_VERSION,
|
||||
namespace='manager.api')
|
||||
|
||||
|
||||
def get_service_target():
|
||||
return messaging.Target(topic=CONF.manager.rpc_topic,
|
||||
version=RPC_API_VERSION,
|
||||
server=CONF.host,
|
||||
|
@ -71,7 +71,7 @@ class ManagerService(service_utils.RPCServer):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
target = manager.get_target()
|
||||
target = manager.get_service_target()
|
||||
super(ManagerService, self).__init__(target)
|
||||
self.plugins = self._get_plugins()
|
||||
self.resource_actions = self._setup_actions()
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Allow multiple Blazar API services to run against a single Blazar manager
|
||||
service.
|
Loading…
x
Reference in New Issue
Block a user