From af703e7376aba2c471389ae736f7d32ea7fa23a6 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 30 Aug 2017 15:48:12 +0100 Subject: [PATCH] conf: Remove '[conductor] topic' opt This should have been removed in '6ef30d5', but was missed as it used a different name to the other opts. Change-Id: I85cb86e0c203967da544750a9e52b207f707e8e5 --- nova/cmd/conductor.py | 3 ++- nova/conductor/api.py | 2 +- nova/conductor/rpcapi.py | 5 +++-- nova/conf/conductor.py | 13 ------------- .../remove-topic-config-opts-705ebd829a6e80b6.yaml | 7 +++++++ 5 files changed, 13 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/remove-topic-config-opts-705ebd829a6e80b6.yaml diff --git a/nova/cmd/conductor.py b/nova/cmd/conductor.py index 12e4f71cfbee..6beee447775a 100644 --- a/nova/cmd/conductor.py +++ b/nova/cmd/conductor.py @@ -20,6 +20,7 @@ from oslo_concurrency import processutils from oslo_log import log as logging from oslo_reports import guru_meditation_report as gmr +from nova.conductor import rpcapi import nova.conf from nova import config from nova import objects @@ -40,7 +41,7 @@ def main(): gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-conductor', - topic=CONF.conductor.topic) + topic=rpcapi.RPC_TOPIC) workers = CONF.conductor.workers or processutils.get_worker_count() service.serve(server, workers=workers) service.wait() diff --git a/nova/conductor/api.py b/nova/conductor/api.py index 947d755832d3..9c2972eb4b4e 100644 --- a/nova/conductor/api.py +++ b/nova/conductor/api.py @@ -31,7 +31,7 @@ class API(object): def __init__(self): self.conductor_rpcapi = rpcapi.ConductorAPI() - self.base_rpcapi = baserpc.BaseAPI(topic=CONF.conductor.topic) + self.base_rpcapi = baserpc.BaseAPI(topic=rpcapi.RPC_TOPIC) def object_backport_versions(self, context, objinst, object_versions): return self.conductor_rpcapi.object_backport_versions(context, objinst, diff --git a/nova/conductor/rpcapi.py b/nova/conductor/rpcapi.py index 5a1a06c2215a..1c3edf507acb 100644 --- a/nova/conductor/rpcapi.py +++ b/nova/conductor/rpcapi.py @@ -25,6 +25,7 @@ from nova import profiler from nova import rpc CONF = nova.conf.CONF +RPC_TOPIC = 'conductor' @profiler.trace_cls("rpc") @@ -211,7 +212,7 @@ class ConductorAPI(object): def __init__(self): super(ConductorAPI, self).__init__() - target = messaging.Target(topic=CONF.conductor.topic, version='3.0') + target = messaging.Target(topic=RPC_TOPIC, version='3.0') version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.conductor, CONF.upgrade_levels.conductor) serializer = objects_base.NovaObjectSerializer() @@ -278,7 +279,7 @@ class ComputeTaskAPI(object): def __init__(self): super(ComputeTaskAPI, self).__init__() - target = messaging.Target(topic=CONF.conductor.topic, + target = messaging.Target(topic=RPC_TOPIC, namespace='compute_task', version='1.0') serializer = objects_base.NovaObjectSerializer() diff --git a/nova/conf/conductor.py b/nova/conf/conductor.py index 6ea97cd79ef9..7ca1f855e7e7 100644 --- a/nova/conf/conductor.py +++ b/nova/conf/conductor.py @@ -26,19 +26,6 @@ and finally, how many worker processes will be used. ) ALL_OPTS = [ - cfg.StrOpt( - 'topic', - default='conductor', - deprecated_for_removal=True, - deprecated_since='15.0.0', - deprecated_reason=""" -There is no need to let users choose the RPC topic for all services - there -is little gain from this. Furthermore, it makes it really easy to break Nova -by using this option. -""", - help=""" -Topic exchange name on which conductor nodes listen. -"""), cfg.IntOpt( 'workers', help=""" diff --git a/releasenotes/notes/remove-topic-config-opts-705ebd829a6e80b6.yaml b/releasenotes/notes/remove-topic-config-opts-705ebd829a6e80b6.yaml new file mode 100644 index 000000000000..81f44258d46f --- /dev/null +++ b/releasenotes/notes/remove-topic-config-opts-705ebd829a6e80b6.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The ``[conductor] topic`` configuration option was previously deprecated + and is now removed from nova. There was no need to let users choose the + RPC topics for all services. There was little benefit from this and it made + it really easy to break nova by changing the value of topic options.