diff options
Diffstat (limited to 'nova')
-rw-r--r-- | nova/service.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nova/service.py b/nova/service.py index 715040323..025dbf500 100644 --- a/nova/service.py +++ b/nova/service.py @@ -128,6 +128,9 @@ class Service(service.Service): self.host = host self.binary = binary self.topic = topic + # Register service name for RPC use as early as possible + self.node_topic = rpc.queue_get_for(None, self.topic, self.host) + rpc.set_service_name(self.node_topic) self.manager_class_name = manager # NOTE(russellb) We want to make sure to create the servicegroup API # instance early, before creating other things such as the manager, @@ -177,8 +180,7 @@ class Service(service.Service): # Share this same connection for these Consumers self.conn.create_consumer(self.topic, rpc_dispatcher, fanout=False) - node_topic = '%s.%s' % (self.topic, self.host) - self.conn.create_consumer(node_topic, rpc_dispatcher, fanout=False) + self.conn.create_consumer(self.node_topic, rpc_dispatcher, fanout=False) self.conn.create_consumer(self.topic, rpc_dispatcher, fanout=True) @@ -322,6 +324,10 @@ class WSGIService(object): self.port = self.server.port self.backdoor_port = None + # Register service name for RPC use as early as possible + self.node_topic = rpc.queue_get_for(None, 'api', CONF.host) + rpc.set_service_name(self.node_topic) + def _get_manager(self): """Initialize a Manager object appropriate for this service. |