From f8c69efdf19c73f04f2ee1d9dfc3f7c4e142d616 Mon Sep 17 00:00:00 2001 From: Maciej Szankin Date: Wed, 16 Nov 2016 09:44:43 -0600 Subject: [PATCH] conf: remove deprecated cells driver option Change-Id: I582e53c24f1eebf83bbbdaa00164336d10bbcfdb Implements: blueprint centralize-config-options-ocata --- nova/cells/manager.py | 6 ++---- nova/conf/cells.py | 13 ------------- nova/tests/unit/cells/fakes.py | 2 -- ...ated_cells_driver_conf_opt-dbb80137b3632500.yaml | 6 ++++++ 4 files changed, 8 insertions(+), 19 deletions(-) create mode 100644 releasenotes/notes/remove_deprecated_cells_driver_conf_opt-dbb80137b3632500.yaml diff --git a/nova/cells/manager.py b/nova/cells/manager.py index 38fab22668bd..2f28fc44d42c 100644 --- a/nova/cells/manager.py +++ b/nova/cells/manager.py @@ -22,12 +22,12 @@ import time from oslo_log import log as logging import oslo_messaging from oslo_service import periodic_task -from oslo_utils import importutils from oslo_utils import timeutils import six from six.moves import range from nova.cells import messaging +from nova.cells import rpc_driver as cells_rpc_driver from nova.cells import state as cells_state from nova.cells import utils as cells_utils import nova.conf @@ -81,9 +81,7 @@ class CellsManager(manager.Manager): cell_state_manager = cells_state.CellStateManager self.state_manager = cell_state_manager() self.msg_runner = messaging.MessageRunner(self.state_manager) - cells_driver_cls = importutils.import_class( - CONF.cells.driver) - self.driver = cells_driver_cls() + self.driver = cells_rpc_driver.CellsRPCDriver() self.instances_to_heal = iter([]) def post_start_hook(self): diff --git a/nova/conf/cells.py b/nova/conf/cells.py index 531a8ada00d7..347e12136671 100644 --- a/nova/conf/cells.py +++ b/nova/conf/cells.py @@ -243,19 +243,6 @@ Possible values: ] cell_manager_opts = [ - cfg.StrOpt('driver', - default='nova.cells.rpc_driver.CellsRPCDriver', - deprecated_for_removal=True, - deprecated_since="14.0.0", - deprecated_reason='The only available driver ' - 'is the RPC driver.', - help="""Cells communication driver - -Driver for cell<->cell communication via RPC. This is used to -setup the RPC consumers as well as to send a message to another cell. -'nova.cells.rpc_driver.CellsRPCDriver' starts up 2 separate servers -for handling inter-cell communication via RPC. -"""), # TODO(sfinucan): Add min parameter cfg.IntOpt('instance_updated_at_threshold', default=3600, diff --git a/nova/tests/unit/cells/fakes.py b/nova/tests/unit/cells/fakes.py index e567e7a03809..94a02b8562bb 100644 --- a/nova/tests/unit/cells/fakes.py +++ b/nova/tests/unit/cells/fakes.py @@ -168,8 +168,6 @@ def _build_cell_stub_infos(test_case): def init(test_case): global CELL_NAME_TO_STUB_INFO - test_case.flags(driver='nova.tests.unit.cells.fakes.FakeCellsDriver', - group='cells') CELL_NAME_TO_STUB_INFO = {} _build_cell_stub_infos(test_case) diff --git a/releasenotes/notes/remove_deprecated_cells_driver_conf_opt-dbb80137b3632500.yaml b/releasenotes/notes/remove_deprecated_cells_driver_conf_opt-dbb80137b3632500.yaml new file mode 100644 index 000000000000..355a7ac39a73 --- /dev/null +++ b/releasenotes/notes/remove_deprecated_cells_driver_conf_opt-dbb80137b3632500.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + ``driver`` configuration option has been removed from ``cells`` + group. There is only one possible driver for cells (CellsRPCDriver), which + makes this option redundant.