From 9d53f366ff8c9a29c4ddbf0fa27febbce7442fc9 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 29 Jan 2021 17:06:29 +0000 Subject: [PATCH] conf: Drop '[scheduler] periodic_task_interval' As the help text for this option stated: Currently there are no in-tree scheduler driver [sic] that use this option. Now that we no longer support out-of-tree drivers, it's time to remove this. Do so. Change-Id: Ib40c25db2c16373677ff32e4e95292fbab498751 Signed-off-by: Stephen Finucane --- nova/conf/scheduler.py | 25 ------------------- nova/conf/service.py | 1 - nova/scheduler/driver.py | 4 --- nova/scheduler/manager.py | 5 ---- ...ove-customer-filters-95ab8c7a3aff058d.yaml | 3 +++ 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py index 891dec745c35..6cad9bd8f040 100644 --- a/nova/conf/scheduler.py +++ b/nova/conf/scheduler.py @@ -22,31 +22,6 @@ scheduler_group = cfg.OptGroup(name="scheduler", title="Scheduler configuration") scheduler_opts = [ - cfg.IntOpt("periodic_task_interval", - default=60, - help=""" -Periodic task interval. - -This value controls how often (in seconds) to run periodic tasks in the -scheduler. The specific tasks that are run for each period are determined by -the particular scheduler being used. Currently there are no in-tree scheduler -driver that use this option. - -If this is larger than the nova-service 'service_down_time' setting, the -ComputeFilter (if enabled) may think the compute service is down. As each -scheduler can work a little differently than the others, be sure to test this -with your selected scheduler. - -Possible values: - -* An integer, where the integer corresponds to periodic task interval in - seconds. 0 uses the default interval (60 seconds). A negative value disables - periodic tasks. - -Related options: - -* ``nova-service service_down_time`` -"""), cfg.IntOpt("max_attempts", default=3, min=1, diff --git a/nova/conf/service.py b/nova/conf/service.py index 6a57efa1cfc8..e10f3a049264 100644 --- a/nova/conf/service.py +++ b/nova/conf/service.py @@ -49,7 +49,6 @@ for more than service_down_time, then the compute node is considered down. Related Options: * report_interval (service_down_time should not be less than report_interval) -* scheduler.periodic_task_interval """), cfg.BoolOpt('periodic_enable', default=True, diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index d799c65b3a71..5a272ddc8711 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -45,10 +45,6 @@ class Scheduler(metaclass=abc.ABCMeta): self.host_manager = host_manager.HostManager() self.servicegroup_api = servicegroup.API() - def run_periodic_tasks(self, context): - """Manager calls this so drivers can perform periodic tasks.""" - pass - def hosts_up(self, context, topic): """Return the list of hosts that have a running service for topic.""" diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index 753f4b1b1d74..cf15f93e94fd 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -85,11 +85,6 @@ class SchedulerManager(manager.Manager): else: LOG.debug(msg) - @periodic_task.periodic_task(spacing=CONF.scheduler.periodic_task_interval, - run_immediately=True) - def _run_periodic_tasks(self, context): - self.driver.run_periodic_tasks(context) - def reset(self): # NOTE(tssurya): This is a SIGHUP handler which will reset the cells # and enabled cells caches in the host manager. So every time an diff --git a/releasenotes/notes/remove-customer-filters-95ab8c7a3aff058d.yaml b/releasenotes/notes/remove-customer-filters-95ab8c7a3aff058d.yaml index 605e02848b49..7406e159eafb 100644 --- a/releasenotes/notes/remove-customer-filters-95ab8c7a3aff058d.yaml +++ b/releasenotes/notes/remove-customer-filters-95ab8c7a3aff058d.yaml @@ -9,3 +9,6 @@ upgrade: - | The ``[scheduler] scheduler_driver`` config option has been removed, along with the ``nova.scheduler.driver`` setuptools entrypoint. + - | + The ``[scheduler] periodic_task_interval`` config option has been removed. + It was no longer used by any supported scheduler drivers.