Merge "Remove [scheduler]/host_manager config option"

This commit is contained in:
Zuul 2018-05-09 10:53:57 +00:00 committed by Gerrit Code Review
commit a8d3c61a57
5 changed files with 5 additions and 40 deletions

View File

@ -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",

View File

@ -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):

View File

@ -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."""

View File

@ -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

View File

@ -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