summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-05-02 15:17:17 -0400
committerSimo Sorce <simo@redhat.com>2013-07-02 15:49:18 -0400
commitb5477b8f9abe53e3bec2bd91be9bb8ceba36eeb8 (patch)
treede6467f4644c1a05f5eee698a139d7951454891b
parent54b2fcbe4726f7f2273330df29ad156b0bd5073e (diff)
downloadnova-shared-key-msg.tar.gz
nova-shared-key-msg.tar.xz
nova-shared-key-msg.zip
Initialize RPC machinery with our topic nameshared-key-msg
This is used by RPC code to use Secure Messages
-rw-r--r--nova/service.py10
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.