diff --git a/nova/cells/__init__.py b/nova/cells/__init__.py index ea277b7f9c8a..caf1eab3f2e4 100644 --- a/nova/cells/__init__.py +++ b/nova/cells/__init__.py @@ -15,3 +15,5 @@ """ Cells """ + +TOPIC = 'cells' diff --git a/nova/cells/rpcapi.py b/nova/cells/rpcapi.py index e80c4bbf5381..45e52f0cd7f2 100644 --- a/nova/cells/rpcapi.py +++ b/nova/cells/rpcapi.py @@ -27,6 +27,7 @@ from oslo_log import log as logging import oslo_messaging as messaging from oslo_serialization import jsonutils +from nova import cells import nova.conf from nova import exception from nova import objects @@ -135,7 +136,7 @@ class CellsAPI(object): def __init__(self): super(CellsAPI, self).__init__() - target = messaging.Target(topic=CONF.cells.topic, version='1.0') + target = messaging.Target(topic=cells.TOPIC, version='1.0') version_cap = self.VERSION_ALIASES.get(CONF.upgrade_levels.cells, CONF.upgrade_levels.cells) # NOTE(sbauza): Yes, this is ugly but cells_utils is calling cells.db diff --git a/nova/cmd/cells.py b/nova/cmd/cells.py index 52b3fdcd79a4..9af3937abde6 100644 --- a/nova/cmd/cells.py +++ b/nova/cmd/cells.py @@ -20,6 +20,7 @@ import sys from oslo_log import log as logging from oslo_reports import guru_meditation_report as gmr +from nova import cells import nova.conf from nova import config from nova import objects @@ -39,7 +40,7 @@ def main(): gmr.TextGuruMeditation.setup_autorun(version) server = service.Service.create(binary='nova-cells', - topic=CONF.cells.topic, + topic=cells.TOPIC, manager='nova.cells.manager.CellsManager') service.serve(server) service.wait() diff --git a/nova/conf/cells.py b/nova/conf/cells.py index c3154b7f0b14..5fd7e84c0bf6 100644 --- a/nova/conf/cells.py +++ b/nova/conf/cells.py @@ -29,25 +29,6 @@ required and all Nova deployments will be at least a cells v2 cell of one. """) cells_opts = [ - cfg.StrOpt('topic', - default='cells', - deprecated_for_removal=True, - deprecated_since='15.0.0', - deprecated_reason=""" -Configurable RPC topics provide little value and can result in a wide variety -of errors. They should not be used. -""", - help=""" -Topic. - -This is the message queue topic that cells nodes listen on. It is -used when the cells service is started up to configure the queue, -and whenever an RPC call to the scheduler is made. - -Possible values: - -* cells: This is the recommended and the default value. -"""), cfg.BoolOpt('enable', default=False, help=""" diff --git a/nova/tests/unit/cells/test_cells_rpcapi.py b/nova/tests/unit/cells/test_cells_rpcapi.py index 6b372e4a847e..b80c69e0c74c 100644 --- a/nova/tests/unit/cells/test_cells_rpcapi.py +++ b/nova/tests/unit/cells/test_cells_rpcapi.py @@ -34,9 +34,9 @@ class CellsAPITestCase(test.NoDBTestCase): def setUp(self): super(CellsAPITestCase, self).setUp() - self.fake_topic = 'fake_topic' + self.fake_topic = 'cells' self.fake_context = 'fake_context' - self.flags(topic=self.fake_topic, enable=True, group='cells') + self.flags(enable=True, group='cells') self.cells_rpcapi = cells_rpcapi.CellsAPI() def _stub_rpc_method(self, rpc_method, result): diff --git a/releasenotes/notes/remove-nova-cells-topic-config-a7cd4d1a3e2d7d5b.yaml b/releasenotes/notes/remove-nova-cells-topic-config-a7cd4d1a3e2d7d5b.yaml new file mode 100644 index 000000000000..e2264cea4728 --- /dev/null +++ b/releasenotes/notes/remove-nova-cells-topic-config-a7cd4d1a3e2d7d5b.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + The cells topic configuration option has been removed. Please make sure + your cells related message queue topic is 'cells'.