Merge "Fix the topic and server that the listener client uses"

This commit is contained in:
Jenkins 2015-03-24 10:36:10 +00:00 committed by Gerrit Code Review
commit 882a839e5f
3 changed files with 6 additions and 4 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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,