Fix the topic and server that the listener client uses
This was only working for one heat engine as it was sending the listener messages to a topic of "engine_id". Change-Id: Ib542d1ebb85b004f5a67213e678882c5a723dc0e Closes-bug: 1433821
This commit is contained in:
parent
ed1ce5d8f2
commit
f19c54dd9a
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user