Fixes bug #
1173573
We currently send engine RPCs to the 'engine.$host' topic means that
it is impossible to run heat-api and heat-engine on different
machines because you can't configure heat-api with the hostname of
heat-engine.
Fix this simply by sending RPCs to 'engine' which heat-engine. We have
always listened on this topic, so there is no backwards compat
concerns.
This is somewhat related to the multiple-engines blueprint, but
doesn't really help or hinder it.
Change-Id: Ibd4dc948ace4476bfa8e7fdc86e948a622416e58
from oslo.config import cfg
-from heat.openstack.common import rpc
import heat.openstack.common.rpc.proxy
CONF = cfg.CONF
def __init__(self):
super(EngineClient, self).__init__(
- topic=rpc.queue_get_for(None, CONF.engine_topic, CONF.host),
+ topic=CONF.engine_topic,
default_version=self.BASE_RPC_API_VERSION)
def identify_stack(self, ctxt, stack_name):
cfg.CONF.register_opts(opts)
cfg.CONF.set_default('engine_topic', 'engine')
cfg.CONF.set_default('host', 'host')
- self.topic = '%s.%s' % (cfg.CONF.engine_topic, cfg.CONF.host)
+ self.topic = cfg.CONF.engine_topic
self.api_version = '1.0'
# Create WSGI controller instance
cfg.CONF.register_opts(opts)
cfg.CONF.set_default('engine_topic', 'engine')
cfg.CONF.set_default('host', 'host')
- self.topic = '%s.%s' % (cfg.CONF.engine_topic, cfg.CONF.host)
+ self.topic = cfg.CONF.engine_topic
self.api_version = '1.0'
# Create WSGI controller instance
cfg.CONF.set_default('engine_topic', 'engine')
cfg.CONF.set_default('host', 'host')
- self.topic = '%s.%s' % (cfg.CONF.engine_topic, cfg.CONF.host)
+ self.topic = cfg.CONF.engine_topic
self.api_version = '1.0'
self.tenant = 't'
expected_msg = rpcapi.make_msg(method, **kwargs)
expected_msg['version'] = expected_version
- expected_topic = '%s.%s' % (cfg.CONF.engine_topic, cfg.CONF.host)
+ expected_topic = cfg.CONF.engine_topic
cast_and_call = ['delete_stack']
if rpc_method == 'call' and method in cast_and_call: