diff --git a/doc/source/admin/configuration/schedulers.rst b/doc/source/admin/configuration/schedulers.rst index 3ea23fc81c12..e00a900c4642 100644 --- a/doc/source/admin/configuration/schedulers.rst +++ b/doc/source/admin/configuration/schedulers.rst @@ -18,14 +18,12 @@ Compute is configured with the following default scheduler options in the [filter_scheduler] available_filters = nova.scheduler.filters.all_filters - enabled_filters = RetryFilter, AvailabilityZoneFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter + enabled_filters = AvailabilityZoneFilter, ComputeFilter, ComputeCapabilitiesFilter, ImagePropertiesFilter, ServerGroupAntiAffinityFilter, ServerGroupAffinityFilter By default, the scheduler ``driver`` is configured as a filter scheduler, as described in the next section. In the default configuration, this scheduler considers hosts that meet all the following criteria: -* Have not been attempted for scheduling purposes (``RetryFilter``). - * Are in the requested availability zone (``AvailabilityZoneFilter``). * Can service the request (``ComputeFilter``). @@ -720,13 +718,22 @@ free RAM. RetryFilter ----------- +.. deprecated:: 20.0.0 + + Since the 17.0.0 (Queens) release, the scheduler has provided alternate + hosts for rescheduling so the scheduler does not need to be called during + a reschedule which makes the ``RetryFilter`` useless. See the + `Return Alternate Hosts`_ spec for details. + Filters out hosts that have already been attempted for scheduling purposes. If the scheduler selects a host to respond to a service request, and the host fails to respond to the request, this filter prevents the scheduler from retrying that host for the service request. -This filter is only useful if the ``scheduler_max_attempts`` configuration -option is set to a value greater than zero. +This filter is only useful if the :oslo.config:option:`scheduler.max_attempts` +configuration option is set to a value greater than one. + +.. _Return Alternate Hosts: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/return-alternate-hosts.html SameHostFilter -------------- diff --git a/doc/source/user/filter-scheduler.rst b/doc/source/user/filter-scheduler.rst index 9e26dd30b0f9..4fc7d62ae3d4 100644 --- a/doc/source/user/filter-scheduler.rst +++ b/doc/source/user/filter-scheduler.rst @@ -167,8 +167,8 @@ There are many standard filter classes which may be used set of instances. * |SameHostFilter| - puts the instance on the same host as another instance in a set of instances. -* |RetryFilter| - filters hosts that have been attempted for scheduling. - Only passes hosts that have not been previously attempted. +* |RetryFilter| - DEPRECATED; filters hosts that have been attempted for + scheduling. Only passes hosts that have not been previously attempted. * |AggregateTypeAffinityFilter| - limits instance_type by aggregate. This filter passes hosts if no instance_type key is set or the instance_type aggregate metadata value contains the name of the @@ -303,6 +303,15 @@ exception even if the problem is related to 1:N compute nodes. If you see that case in the scheduler logs, then your problem is most likely related to a compute problem and you should check the compute logs. +.. note:: The ``RetryFilter`` is deprecated since the 20.0.0 (Train) release + and will be removed in an upcoming release. Since the 17.0.0 (Queens) + release, the scheduler has provided alternate hosts for rescheduling + so the scheduler does not need to be called during a reschedule which + makes the ``RetryFilter`` useless. See the `Return Alternate Hosts`_ + spec for details. + +.. _Return Alternate Hosts: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/return-alternate-hosts.html + The |NUMATopologyFilter| considers the NUMA topology that was specified for the instance through the use of flavor extra_specs in combination with the image properties, as described in detail in the related nova-spec document: diff --git a/nova/conf/scheduler.py b/nova/conf/scheduler.py index 5e1d93ed5a02..823412aab6d8 100644 --- a/nova/conf/scheduler.py +++ b/nova/conf/scheduler.py @@ -311,7 +311,6 @@ Related options: # Tempest's scheduler_enabled_filters to keep the default values in # sync. default=[ - "RetryFilter", "AvailabilityZoneFilter", "ComputeFilter", "ComputeCapabilitiesFilter", diff --git a/nova/scheduler/filters/retry_filter.py b/nova/scheduler/filters/retry_filter.py index 1bd7335ec19a..56b1853811f0 100644 --- a/nova/scheduler/filters/retry_filter.py +++ b/nova/scheduler/filters/retry_filter.py @@ -29,6 +29,14 @@ class RetryFilter(filters.BaseHostFilter): # related to rebuild. RUN_ON_REBUILD = False + def __init__(self): + super(RetryFilter, self).__init__() + LOG.warning('The RetryFilter is deprecated since the 20.0.0 Train ' + 'release. Since the 17.0.0 (Queens) release, the ' + 'scheduler has provided alternate hosts for rescheduling ' + 'so the scheduler does not need to be called during a ' + 'reschedule which makes the RetryFilter useless.') + def host_passes(self, host_state, spec_obj): """Skip nodes that have already been attempted.""" retry = spec_obj.retry diff --git a/nova/tests/unit/scheduler/filters/test_retry_filters.py b/nova/tests/unit/scheduler/filters/test_retry_filters.py index 8fad8be1996c..7deeaf60b676 100644 --- a/nova/tests/unit/scheduler/filters/test_retry_filters.py +++ b/nova/tests/unit/scheduler/filters/test_retry_filters.py @@ -21,6 +21,8 @@ class TestRetryFilter(test.NoDBTestCase): def setUp(self): super(TestRetryFilter, self).setUp() self.filt_cls = retry_filter.RetryFilter() + self.assertIn('The RetryFilter is deprecated', + self.stdlog.logger.output) def test_retry_filter_disabled(self): # Test case where retry/re-scheduling is disabled. diff --git a/releasenotes/notes/deprecate-retry-filter-4d1dba39a2c21836.yaml b/releasenotes/notes/deprecate-retry-filter-4d1dba39a2c21836.yaml new file mode 100644 index 000000000000..4df97d4fe461 --- /dev/null +++ b/releasenotes/notes/deprecate-retry-filter-4d1dba39a2c21836.yaml @@ -0,0 +1,10 @@ +--- +deprecations: + - | + The ``RetryFilter`` is deprecated and will be removed in an upcoming + release. Since the 17.0.0 (Queens) release, the scheduler has provided + alternate hosts for rescheduling so the scheduler does not need to be + called during a reschedule which makes the ``RetryFilter`` useless. + See the `Return Alternate Hosts`_ spec for details. + + .. _Return Alternate Hosts: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/return-alternate-hosts.html