diff options
author | Matt Riedemann <mriedem.os@gmail.com> | 2018-05-02 11:37:36 -0400 |
---|---|---|
committer | Matt Riedemann <mriedem.os@gmail.com> | 2018-05-03 09:39:26 -0400 |
commit | 4a55e260a4e779287a9af85d2c04e9d7dafdb4d2 (patch) | |
tree | c3e040cc44a439c31fe7d42a004b75fd7175932f | |
parent | a55608897effa0751a1a525b84cfb168af230890 (diff) | |
download | nova-4a55e260a4e779287a9af85d2c04e9d7dafdb4d2.tar.gz |
Remove [scheduler]/host_manager config option
While this option itself was not technically deprecated,
the option only had two choices and the "ironic_host_manager"
choice has been deprecated since Queens:
Iebc74a09990dcda8cf0ee2a41f9ae1058d2a182a
And was removed in Rocky:
I695b250c82c8dcedcd8e2bee00c56bb2df19212c
Since the host_manager option only had one choice, which
is also the default, it's not really an option anymore and
we can simply remove it. Setting it will have no effect
so there should be no upgrade impact for its removal.
Change-Id: Ic61ae3a4f563aa54a3a2956667c702a81e610fc3
-rw-r--r-- | nova/conf/scheduler.py | 14 | ||||
-rw-r--r-- | nova/scheduler/driver.py | 10 | ||||
-rw-r--r-- | nova/tests/unit/scheduler/test_scheduler.py | 14 | ||||
-rw-r--r-- | releasenotes/notes/remove-baremetal-filters-52db06d597645d00.yaml | 4 | ||||
-rw-r--r-- | setup.cfg | 3 |
5 files changed, 5 insertions, 40 deletions
diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py index b72bb92a08..5b20dacd23 100644 --- a/nova/conf/scheduler.py +++ b/nova/conf/scheduler.py @@ -20,20 +20,6 @@ scheduler_group = cfg.OptGroup(name="scheduler", title="Scheduler configuration") scheduler_opts = [ - # TODO(mriedem): We should be able to remove this now since it's not an - # option anymore. - cfg.StrOpt("host_manager", - default="host_manager", - choices=("host_manager",), - deprecated_name="scheduler_host_manager", - deprecated_group="DEFAULT", - help=""" -The scheduler host manager to use. - -The host manager manages the in-memory picture of the hosts that the scheduler -uses. The options values are chosen from the entry points under the namespace -'nova.scheduler.host_manager' in 'setup.cfg'. -"""), cfg.StrOpt("driver", default="filter_scheduler", deprecated_name="scheduler_driver", diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index 35198359ba..84d49da942 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -22,14 +22,11 @@ Scheduler base class that all Schedulers should inherit from import abc import six -from stevedore import driver -import nova.conf from nova import objects +from nova.scheduler import host_manager from nova import servicegroup -CONF = nova.conf.CONF - @six.add_metaclass(abc.ABCMeta) class Scheduler(object): @@ -42,10 +39,7 @@ class Scheduler(object): """ def __init__(self): - self.host_manager = driver.DriverManager( - "nova.scheduler.host_manager", - CONF.scheduler.host_manager, - invoke_on_load=True).driver + self.host_manager = host_manager.HostManager() self.servicegroup_api = servicegroup.API() def run_periodic_tasks(self, context): diff --git a/nova/tests/unit/scheduler/test_scheduler.py b/nova/tests/unit/scheduler/test_scheduler.py index 35a9ad986f..da152c102a 100644 --- a/nova/tests/unit/scheduler/test_scheduler.py +++ b/nova/tests/unit/scheduler/test_scheduler.py @@ -353,20 +353,6 @@ class SchedulerManagerTestCase(test.NoDBTestCase): self.manager._discover_hosts_in_cells(mock.sentinel.context) -class SchedulerInitTestCase(test.NoDBTestCase): - """Test case for base scheduler driver initiation.""" - - driver_cls = fakes.FakeScheduler - - @mock.patch.object(host_manager.HostManager, '_init_instance_info') - @mock.patch.object(host_manager.HostManager, '_init_aggregates') - def test_init_using_default_hostmanager(self, - mock_init_agg, - mock_init_inst): - manager = self.driver_cls().host_manager - self.assertIsInstance(manager, host_manager.HostManager) - - class SchedulerTestCase(test.NoDBTestCase): """Test case for base scheduler driver class.""" diff --git a/releasenotes/notes/remove-baremetal-filters-52db06d597645d00.yaml b/releasenotes/notes/remove-baremetal-filters-52db06d597645d00.yaml index 45a1ee9f76..e1bc382d8e 100644 --- a/releasenotes/notes/remove-baremetal-filters-52db06d597645d00.yaml +++ b/releasenotes/notes/remove-baremetal-filters-52db06d597645d00.yaml @@ -12,7 +12,9 @@ upgrade: 17.0.0 Queens release because ``ironic_host_manager`` is only useful when using ``use_baremetal_filters=True`` and ``baremetal_enabled_filters``. Now that those options are gone, the deprecated ``ironic_host_manager`` - host manager choice has also been removed. + host manager choice has also been removed. As a result, the + ``[scheduler]/host_manager`` configuration option has also been removed + since there is only one host manager now and no need for an option. Remember to run ``nova-status upgrade check`` before upgrading to 18.0.0 Rocky to ensure baremetal instances have had their embedded @@ -81,9 +81,6 @@ nova.ipv6_backend = rfc2462 = nova.ipv6.rfc2462 account_identifier = nova.ipv6.account_identifier -nova.scheduler.host_manager = - host_manager = nova.scheduler.host_manager:HostManager - nova.scheduler.driver = filter_scheduler = nova.scheduler.filter_scheduler:FilterScheduler caching_scheduler = nova.scheduler.caching_scheduler:CachingScheduler |