Drop support for custom schedulers
We deprecated this functionality in Ussuri and can now remove it. It's highly unlikely that there exists a functioning alternative to this scheduler and it's not something we can really support nowadays. Change-Id: I546d3d329a69acaad3ada48ccbfddf3a274b6ce2 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
4827a90a02
commit
5aeb3a3874
@ -27,7 +27,7 @@ import nova.conf
|
||||
from nova.conf import remote_debug
|
||||
from nova import config
|
||||
from nova import objects
|
||||
from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
from nova.scheduler import rpcapi
|
||||
from nova import service
|
||||
from nova import version
|
||||
|
||||
@ -44,13 +44,11 @@ def main():
|
||||
|
||||
gmr.TextGuruMeditation.setup_autorun(version, conf=CONF)
|
||||
|
||||
server = service.Service.create(binary='nova-scheduler',
|
||||
topic=scheduler_rpcapi.RPC_TOPIC)
|
||||
server = service.Service.create(
|
||||
binary='nova-scheduler', topic=rpcapi.RPC_TOPIC)
|
||||
|
||||
# Determine the number of workers; if not specified in config, default
|
||||
# to ncpu for the FilterScheduler and 1 for everything else.
|
||||
workers = CONF.scheduler.workers
|
||||
if not workers:
|
||||
workers = (processutils.get_worker_count()
|
||||
if CONF.scheduler.driver == 'filter_scheduler' else 1)
|
||||
# to number of CPUs
|
||||
workers = CONF.scheduler.workers or processutils.get_worker_count()
|
||||
service.serve(server, workers=workers)
|
||||
service.wait()
|
||||
|
@ -22,39 +22,6 @@ scheduler_group = cfg.OptGroup(name="scheduler",
|
||||
title="Scheduler configuration")
|
||||
|
||||
scheduler_opts = [
|
||||
cfg.StrOpt("driver",
|
||||
default="filter_scheduler",
|
||||
deprecated_name="scheduler_driver",
|
||||
deprecated_group="DEFAULT",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_since='21.0.0',
|
||||
deprecated_reason="""
|
||||
nova no longer provides any in-tree filters except for the 'filter_scheduler'
|
||||
scheduler. This filter is considered flexible and pluggable enough for all use
|
||||
cases and can be extended through the use of custom, out-of-tree filters and
|
||||
weighers along with powerful, in-tree filters like the
|
||||
'AggregateInstanceExtraSpecsFilter' and 'ComputeCapabilitiesFilter' filters.
|
||||
""",
|
||||
help="""
|
||||
The class of the driver used by the scheduler. This should be chosen from one
|
||||
of the entrypoints under the namespace 'nova.scheduler.driver' of file
|
||||
'setup.cfg'. If nothing is specified in this option, the 'filter_scheduler' is
|
||||
used.
|
||||
|
||||
Possible values:
|
||||
|
||||
* Any of the drivers included in Nova:
|
||||
|
||||
* filter_scheduler
|
||||
|
||||
* You may also set this to the entry point name of a custom scheduler driver,
|
||||
but you will be responsible for creating and maintaining it in your
|
||||
``setup.cfg`` file.
|
||||
|
||||
Related options:
|
||||
|
||||
* workers
|
||||
"""),
|
||||
cfg.IntOpt("periodic_task_interval",
|
||||
default=60,
|
||||
help="""
|
||||
|
@ -25,7 +25,6 @@ from oslo_log import log as logging
|
||||
import oslo_messaging as messaging
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_service import periodic_task
|
||||
from stevedore import driver
|
||||
|
||||
import nova.conf
|
||||
from nova import exception
|
||||
@ -34,6 +33,7 @@ from nova import objects
|
||||
from nova.objects import host_mapping as host_mapping_obj
|
||||
from nova import quota
|
||||
from nova.scheduler.client import report
|
||||
from nova.scheduler import filter_scheduler
|
||||
from nova.scheduler import request_filter
|
||||
from nova.scheduler import utils
|
||||
|
||||
@ -56,11 +56,7 @@ class SchedulerManager(manager.Manager):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.placement_client = report.SchedulerReportClient()
|
||||
self.driver = driver.DriverManager(
|
||||
'nova.scheduler.driver',
|
||||
CONF.scheduler.driver,
|
||||
invoke_on_load=True
|
||||
).driver
|
||||
self.driver = filter_scheduler.FilterScheduler()
|
||||
|
||||
super(SchedulerManager, self).__init__(
|
||||
service_name='scheduler', *args, **kwargs
|
||||
|
@ -99,7 +99,6 @@ class ServersTestBase(integrated_helpers._IntegratedTestBase):
|
||||
enabled_filters = CONF.filter_scheduler.enabled_filters
|
||||
enabled_filters += self.ADDITIONAL_FILTERS
|
||||
|
||||
self.flags(driver='filter_scheduler', group='scheduler')
|
||||
self.flags(enabled_filters=enabled_filters, group='filter_scheduler')
|
||||
|
||||
return self.start_service('scheduler')
|
||||
|
@ -44,16 +44,6 @@ class SchedulerManagerInitTestCase(test.NoDBTestCase):
|
||||
driver = self.manager_cls().driver
|
||||
self.assertIsInstance(driver, filter_scheduler.FilterScheduler)
|
||||
|
||||
@mock.patch.object(host_manager.HostManager, '_init_instance_info')
|
||||
@mock.patch.object(host_manager.HostManager, '_init_aggregates')
|
||||
def test_init_nonexist_schedulerdriver(self,
|
||||
mock_init_agg,
|
||||
mock_init_inst):
|
||||
self.flags(driver='nonexist_scheduler', group='scheduler')
|
||||
# The entry point has to be defined in setup.cfg and nova-scheduler has
|
||||
# to be deployed again before using a custom value.
|
||||
self.assertRaises(RuntimeError, self.manager_cls)
|
||||
|
||||
|
||||
class SchedulerManagerTestCase(test.NoDBTestCase):
|
||||
"""Test case for scheduler manager."""
|
||||
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Support for custom scheduler drivers, deprecated since the 21.0.0 (Ussuri)
|
||||
release, has been removed. The default ``filter_scheduler`` is now
|
||||
considered performant enough to suit all use cases. Users with specific
|
||||
requirements that they feel are not met by the filter scheduler should
|
||||
contact the nova developers to discuss their issue.
|
||||
- |
|
||||
The ``[scheduler] scheduler_driver`` config option has been removed, along
|
||||
with the ``nova.scheduler.driver`` setuptools entrypoint.
|
@ -64,8 +64,6 @@ nova.api.extra_spec_validators =
|
||||
vmware = nova.api.validation.extra_specs.vmware
|
||||
nova.compute.monitors.cpu =
|
||||
virt_driver = nova.compute.monitors.cpu.virt_driver:Monitor
|
||||
nova.scheduler.driver =
|
||||
filter_scheduler = nova.scheduler.filter_scheduler:FilterScheduler
|
||||
console_scripts =
|
||||
nova-api = nova.cmd.api:main
|
||||
nova-api-metadata = nova.cmd.api_metadata:main
|
||||
|
Loading…
x
Reference in New Issue
Block a user