diff --git a/heat/engine/service.py b/heat/engine/service.py index 41a07d3b2e..2fe205342f 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -232,7 +232,7 @@ class EngineListener(service.Service): super(EngineListener, self).start() self.target = messaging.Target( server=self.engine_id, - topic="heat-engine-listener") + topic=rpc_api.LISTENER_TOPIC) server = rpc_messaging.get_rpc_server(self.target, self) server.start() @@ -863,7 +863,8 @@ class EngineService(service.Service): self.cctxt = self._client.prepare( version='1.0', timeout=timeout, - topic=lock_engine_id) + topic=rpc_api.LISTENER_TOPIC, + server=lock_engine_id) try: self.cctxt.call(cnxt, call, *args, **kwargs) except messaging.MessagingTimeout: diff --git a/heat/engine/stack_lock.py b/heat/engine/stack_lock.py index 5633e4fc54..638b36a091 100644 --- a/heat/engine/stack_lock.py +++ b/heat/engine/stack_lock.py @@ -24,7 +24,7 @@ from heat.common.i18n import _LI from heat.common.i18n import _LW from heat.common import messaging as rpc_messaging from heat.objects import stack_lock as stack_lock_object - +from heat.rpc import api as rpc_api cfg.CONF.import_opt('engine_life_check_timeout', 'heat.common.config') @@ -41,7 +41,7 @@ class StackLock(object): @staticmethod def engine_alive(context, engine_id): client = rpc_messaging.get_rpc_client( - version='1.0', topic="heat-engine-listener", + version='1.0', topic=rpc_api.LISTENER_TOPIC, server=engine_id) client_context = client.prepare( timeout=cfg.CONF.engine_life_check_timeout) diff --git a/heat/rpc/api.py b/heat/rpc/api.py index 7afe5826ec..9b38c56e69 100644 --- a/heat/rpc/api.py +++ b/heat/rpc/api.py @@ -12,6 +12,7 @@ # under the License. ENGINE_TOPIC = 'engine' +LISTENER_TOPIC = 'heat-engine-listener' PARAM_KEYS = ( PARAM_TIMEOUT, PARAM_DISABLE_ROLLBACK, PARAM_ADOPT_STACK_DATA,