Remove engine_topic configuration option
Fixes bug #1173575 This is currently broken since heat-engine always listens to the 'engine' topic and there isn't actually a good use case for this to be configurable, so let's kill it. Change-Id: I35c0292c921f81857f80a7f111df5ac330d54ecf
This commit is contained in:
parent
e28a34f560
commit
117e73ba57
@ -44,6 +44,7 @@ from heat.openstack.common import service
|
||||
|
||||
from heat.common import config
|
||||
from heat.db import api as db_api
|
||||
from heat.rpc import api as rpc_api
|
||||
|
||||
|
||||
LOG = logging.getLogger('heat.engine')
|
||||
@ -62,6 +63,6 @@ if __name__ == '__main__':
|
||||
from heat.engine import service as engine
|
||||
|
||||
db_api.configure()
|
||||
srv = engine.EngineService(cfg.CONF.host, 'engine')
|
||||
srv = engine.EngineService(cfg.CONF.host, rpc_api.ENGINE_TOPIC)
|
||||
launcher = service.launch(srv)
|
||||
launcher.wait()
|
||||
|
@ -111,10 +111,7 @@ rpc_opts = [
|
||||
default=socket.gethostname(),
|
||||
help='Name of the engine node. '
|
||||
'This can be an opaque identifier.'
|
||||
'It is not necessarily a hostname, FQDN, or IP address.'),
|
||||
cfg.StrOpt('engine_topic',
|
||||
default='engine',
|
||||
help='the topic engine nodes listen on')]
|
||||
'It is not necessarily a hostname, FQDN, or IP address.')]
|
||||
|
||||
|
||||
def register_api_opts():
|
||||
|
@ -12,6 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
ENGINE_TOPIC = 'engine'
|
||||
|
||||
PARAM_KEYS = (
|
||||
PARAM_TIMEOUT, PARAM_DISABLE_ROLLBACK
|
||||
) = (
|
||||
|
@ -18,12 +18,9 @@
|
||||
Client side of the heat engine RPC API.
|
||||
"""
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from heat.engine import api
|
||||
import heat.openstack.common.rpc.proxy
|
||||
|
||||
CONF = cfg.CONF
|
||||
|
||||
|
||||
class EngineClient(heat.openstack.common.rpc.proxy.RpcProxy):
|
||||
'''Client side of the heat engine rpc API.
|
||||
@ -37,7 +34,7 @@ class EngineClient(heat.openstack.common.rpc.proxy.RpcProxy):
|
||||
|
||||
def __init__(self):
|
||||
super(EngineClient, self).__init__(
|
||||
topic=CONF.engine_topic,
|
||||
topic=api.ENGINE_TOPIC,
|
||||
default_version=self.BASE_RPC_API_VERSION)
|
||||
|
||||
def identify_stack(self, ctxt, stack_name):
|
||||
|
@ -26,6 +26,7 @@ from heat.common import policy
|
||||
from heat.openstack.common import rpc
|
||||
import heat.openstack.common.rpc.common as rpc_common
|
||||
from heat.common.wsgi import Request
|
||||
from heat.rpc import api as rpc_api
|
||||
from heat.api.aws import exception
|
||||
import heat.api.cfn.v1.stacks as stacks
|
||||
|
||||
@ -1406,9 +1407,8 @@ class CfnStackControllerTest(unittest.TestCase):
|
||||
cfg.StrOpt('project', default='heat'),
|
||||
]
|
||||
cfg.CONF.register_opts(opts)
|
||||
cfg.CONF.set_default('engine_topic', 'engine')
|
||||
cfg.CONF.set_default('host', 'host')
|
||||
self.topic = cfg.CONF.engine_topic
|
||||
self.topic = rpc_api.ENGINE_TOPIC
|
||||
self.api_version = '1.0'
|
||||
|
||||
# Create WSGI controller instance
|
||||
|
@ -25,7 +25,8 @@ from heat.openstack.common import rpc
|
||||
from heat.common.wsgi import Request
|
||||
from heat.api.aws import exception
|
||||
import heat.api.cloudwatch.watch as watches
|
||||
from heat.rpc import api as engine_api
|
||||
from heat.engine import api as engine_api
|
||||
from heat.rpc import api as rpc_api
|
||||
|
||||
|
||||
@attr(tag=['unit', 'api-cloudwatch', 'WatchController'])
|
||||
@ -520,9 +521,8 @@ class WatchControllerTest(unittest.TestCase):
|
||||
cfg.StrOpt('project', default='heat'),
|
||||
]
|
||||
cfg.CONF.register_opts(opts)
|
||||
cfg.CONF.set_default('engine_topic', 'engine')
|
||||
cfg.CONF.set_default('host', 'host')
|
||||
self.topic = cfg.CONF.engine_topic
|
||||
self.topic = rpc_api.ENGINE_TOPIC
|
||||
self.api_version = '1.0'
|
||||
|
||||
# Create WSGI controller instance
|
||||
|
@ -26,6 +26,7 @@ from heat.openstack.common import rpc
|
||||
import heat.openstack.common.rpc.common as rpc_common
|
||||
from heat.common.wsgi import Request
|
||||
from heat.common import urlfetch
|
||||
from heat.rpc import api as rpc_api
|
||||
|
||||
import heat.api.openstack.v1 as api_v1
|
||||
import heat.api.openstack.v1.stacks as stacks
|
||||
@ -158,9 +159,8 @@ class ControllerTest(object):
|
||||
self.maxDiff = None
|
||||
self.m = mox.Mox()
|
||||
|
||||
cfg.CONF.set_default('engine_topic', 'engine')
|
||||
cfg.CONF.set_default('host', 'host')
|
||||
self.topic = cfg.CONF.engine_topic
|
||||
self.topic = rpc_api.ENGINE_TOPIC
|
||||
self.api_version = '1.0'
|
||||
self.tenant = 't'
|
||||
|
||||
|
@ -26,6 +26,7 @@ import unittest
|
||||
|
||||
from heat.common import context
|
||||
from heat.common import identifier
|
||||
from heat.rpc import api as rpc_api
|
||||
from heat.rpc import client as rpc_client
|
||||
from heat.openstack.common import rpc
|
||||
|
||||
@ -38,7 +39,6 @@ class EngineRpcAPITestCase(unittest.TestCase):
|
||||
cfg.CONF.set_default('rpc_backend',
|
||||
'heat.openstack.common.rpc.impl_fake')
|
||||
cfg.CONF.set_default('verbose', True)
|
||||
cfg.CONF.set_default('engine_topic', 'engine')
|
||||
cfg.CONF.set_default('host', 'host')
|
||||
|
||||
self.stubs = stubout.StubOutForTesting()
|
||||
@ -64,7 +64,7 @@ class EngineRpcAPITestCase(unittest.TestCase):
|
||||
expected_msg = rpcapi.make_msg(method, **kwargs)
|
||||
|
||||
expected_msg['version'] = expected_version
|
||||
expected_topic = cfg.CONF.engine_topic
|
||||
expected_topic = rpc_api.ENGINE_TOPIC
|
||||
|
||||
cast_and_call = ['delete_stack']
|
||||
if rpc_method == 'call' and method in cast_and_call:
|
||||
|
Loading…
Reference in New Issue
Block a user