Deprecate Aggregate[Core|Ram|Disk]Filters

The Aggregate[Core|Ram|Disk]Filters have not worked
correctly since ocata, this change deprecates them
for removal next cycle.
http://lists.openstack.org/pipermail/openstack-dev/2018-January/126283.html

Related-Bug: #1804125
Change-Id: Ibfbfdae9e6ec93f772631a84e8969f4e11da8aee
This commit is contained in:
Sean Mooney 2019-07-30 12:18:13 +00:00 committed by Matt Riedemann
parent cb7c2b215e
commit 588194d785
6 changed files with 82 additions and 6 deletions

View File

@ -152,6 +152,20 @@ The following sections describe the available compute filters.
AggregateCoreFilter
-------------------
.. deprecated:: 20.0.0
``AggregateCoreFilter`` is deprecated since the 20.0.0 Train release.
As of the introduction of the placement service in Ocata, the behavior
of this filter :ref:`has changed <bug-1804125>` and no longer should be used.
In the 18.0.0 Rocky release nova `automatically mirrors`_ host aggregates
to placement aggregates.
In the 19.0.0 Stein release initial allocation ratios support was added
which allows management of the allocation ratios via the placement API in
addition to the existing capability to manage allocation ratios via the nova
config. See `Allocation ratios`_ for details.
.. _`automatically mirrors`: https://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/placement-mirror-host-aggregates.html
Filters host by CPU core numbers with a per-aggregate ``cpu_allocation_ratio``
value. If the per-aggregate value is not found, the value falls back to the
global setting. If the host is in more than one aggregate and more than one
@ -163,6 +177,18 @@ Note the ``cpu_allocation_ratio`` :ref:`bug 1804125 <bug-1804125>` restriction.
AggregateDiskFilter
-------------------
.. deprecated:: 20.0.0
``AggregateDiskFilter`` is deprecated since the 20.0.0 Train release.
As of the introduction of the placement service in Ocata, the behavior
of this filter :ref:`has changed <bug-1804125>` and no longer should be used.
In the 18.0.0 Rocky release nova `automatically mirrors`_ host aggregates
to placement aggregates.
In the 19.0.0 Stein release initial allocation ratios support was added
which allows management of the allocation ratios via the placement API in
addition to the existing capability to manage allocation ratios via the nova
config. See `Allocation ratios`_ for details.
Filters host by disk allocation with a per-aggregate ``disk_allocation_ratio``
value. If the per-aggregate value is not found, the value falls back to the
global setting. If the host is in more than one aggregate and more than one
@ -297,6 +323,18 @@ used. For information about how to use this filter, see
AggregateRamFilter
------------------
.. deprecated:: 20.0.0
``AggregateRamFilter`` is deprecated since the 20.0.0 Train release.
As of the introduction of the placement service in Ocata, the behavior
of this filter :ref:`has changed <bug-1804125>` and no longer should be used.
In the 18.0.0 Rocky release nova `automatically mirrors`_ host aggregates
to placement aggregates.
In the 19.0.0 Stein release initial allocation ratios support was added
which allows management of the allocation ratios via the placement API in
addition to the existing capability to manage allocation ratios via the nova
config. See `Allocation ratios`_ for details.
Filters host by RAM allocation of instances with a per-aggregate
``ram_allocation_ratio`` value. If the per-aggregate value is not found, the
value falls back to the global setting. If the host is in more than one

View File

@ -95,7 +95,7 @@ There are many standard filter classes which may be used
use a comma. E.g., "value1,value2". All hosts are passed if no extra_specs
are specified.
* |ComputeFilter| - passes all hosts that are operational and enabled.
* |AggregateCoreFilter| - filters hosts by CPU core number with per-aggregate
* |AggregateCoreFilter| - DEPRECATED; filters hosts by CPU core number with per-aggregate
:oslo.config:option:`cpu_allocation_ratio` setting. If no
per-aggregate value is found, it will fall back to the global default
:oslo.config:option:`cpu_allocation_ratio`.
@ -108,14 +108,14 @@ There are many standard filter classes which may be used
and :oslo.config:option:`filter_scheduler.restrict_isolated_hosts_to_isolated_images`
flags.
* |JsonFilter| - allows simple JSON-based grammar for selecting hosts.
* |AggregateRamFilter| - filters hosts by RAM with per-aggregate
* |AggregateRamFilter| - DEPRECATED; filters hosts by RAM with per-aggregate
:oslo.config:option:`ram_allocation_ratio` setting. If no per-aggregate value
is found, it will fall back to the global default
:oslo.config:option:`ram_allocation_ratio`.
If more than one value is found for a host (meaning the host is in two
different aggregates with different ratio settings), the minimum value
will be used.
* |AggregateDiskFilter| - filters hosts by disk allocation with per-aggregate
* |AggregateDiskFilter| - DEPRECATED; filters hosts by disk allocation with per-aggregate
:oslo.config:option:`disk_allocation_ratio` setting. If no per-aggregate value
is found, it will fall back to the global default
:oslo.config:option:`disk_allocation_ratio`.

View File

@ -24,13 +24,22 @@ LOG = logging.getLogger(__name__)
class AggregateCoreFilter(filters.BaseHostFilter):
"""AggregateCoreFilter with per-aggregate CPU subscription flag.
"""DEPRECATED: AggregateCoreFilter with per-aggregate allocation ratio.
Fall back to global cpu_allocation_ratio if no per-aggregate setting found.
"""
RUN_ON_REBUILD = False
def __init__(self):
super(AggregateCoreFilter, self).__init__()
LOG.warning('The AggregateCoreFilter is deprecated since the 20.0.0 '
'Train release. VCPU filtering is performed natively '
'using the Placement service when using the '
'filter_scheduler driver. Operators should define cpu '
'allocation ratios either per host in the nova.conf '
'or via the placement API.')
def _get_cpu_allocation_ratio(self, host_state, spec_obj):
aggregate_vals = utils.aggregate_values_from_key(
host_state,

View File

@ -22,7 +22,7 @@ LOG = logging.getLogger(__name__)
class AggregateDiskFilter(filters.BaseHostFilter):
"""AggregateDiskFilter with per-aggregate disk allocation ratio flag.
"""DEPRECATED: AggregateDiskFilter with per-aggregate disk allocation ratio
Fall back to global disk_allocation_ratio if no per-aggregate setting
found.
@ -30,6 +30,15 @@ class AggregateDiskFilter(filters.BaseHostFilter):
RUN_ON_REBUILD = False
def __init__(self):
super(AggregateDiskFilter, self).__init__()
LOG.warning('The AggregateDiskFilter is deprecated since the 20.0.0 '
'Train release. DISK_GB filtering is performed natively '
'using the Placement service when using the '
'filter_scheduler driver. Operators should define disk '
'allocation ratios either per host in the nova.conf '
'or via the placement API.')
def _get_disk_allocation_ratio(self, host_state, spec_obj):
aggregate_vals = utils.aggregate_values_from_key(
host_state,

View File

@ -23,13 +23,22 @@ LOG = logging.getLogger(__name__)
class AggregateRamFilter(filters.BaseHostFilter):
"""AggregateRamFilter with per-aggregate ram subscription flag.
"""DEPRECATED: AggregateRamFilter with per-aggregate ram subscription flag.
Fall back to global ram_allocation_ratio if no per-aggregate setting found.
"""
RUN_ON_REBUILD = False
def __init__(self):
super(AggregateRamFilter, self).__init__()
LOG.warning('The AggregateRamFilter is deprecated since the 20.0.0 '
'Train release. MEMORY_MB filtering is performed natively '
'using the Placement service when using the '
'filter_scheduler driver. Operators should define ram '
'allocation ratios either per host in the nova.conf '
'or via the placement API.')
def _get_ram_allocation_ratio(self, host_state, spec_obj):
aggregate_vals = utils.aggregate_values_from_key(
host_state,

View File

@ -0,0 +1,11 @@
---
deprecations:
- |
The ``AggregateCoreFilter``, ``AggregateRamFilter`` and
``AggregateDiskFilter`` are now deprecated.
They will be removed in a future release and should no longer be used.
Their functionality has been replaced with a placement native approach
by combining host aggregate mirroring added in Rocky and initial allocation
ratios added in Stein. See the `scheduler documentation`_ for details.
.. _`scheduler documentation`: https://docs.openstack.org/nova/latest/admin/configuration/schedulers.html