Deprecate Core/Ram/DiskFilter
The time has come. These filters haven't been necessary since Ocata [1] when the filter scheduler started using placement to filter on VCPU, DISK_GB and MEMORY_MB. The only reason to use them with any in-tree scheduler drivers is if using the CachingScheduler which doesn't use placement, but the CachingScheduler itself has been deprecated since Pike [2]. Furthermore, as of change [3] in Stein, the ironic driver no longer reports vcpu/ram/disk inventory for ironic nodes which will make these filters filter out ironic nodes thinking they don't have any inventory. Also, as noted in [4], the DiskFilter does not account for volume-backed instances and may incorrectly filter out a host based on disk inventory when it would otherwise be OK if the instance is not using local disk. The related aggregate filters are left intact for now, see blueprint placement-aggregate-allocation-ratios. [1] Ie12acb76ec5affba536c3c45fbb6de35d64aea1b [2] Ia7ff98ff28b7265058845e46b277317a2bfc96d2 [3] If2b8c1a76d7dbabbac7bb359c9e572cfed510800 [4] I9c2111f7377df65c1fc3c72323f85483b3295989 Change-Id: Id62136d293da55e4bb639635ea5421a33b6c3ea2 Related-Bug: #1787910
This commit is contained in:
parent
ac6e51c10d
commit
243ba85130
@ -301,6 +301,15 @@ In general, you should always enable this filter.
|
||||
CoreFilter
|
||||
----------
|
||||
|
||||
.. deprecated:: 19.0.0
|
||||
|
||||
``CoreFilter`` is deprecated since the 19.0.0 Stein release. VCPU
|
||||
filtering is performed natively using the Placement service when using the
|
||||
``filter_scheduler`` driver. Users of the ``caching_scheduler`` driver may
|
||||
still rely on this filter but the ``caching_scheduler`` driver is itself
|
||||
deprecated. Furthermore, enabling CoreFilter may incorrectly filter out
|
||||
`baremetal nodes`_ which must be scheduled using custom resource classes.
|
||||
|
||||
Only schedules instances on hosts if sufficient CPU cores are available. If
|
||||
this filter is not set, the scheduler might over-provision a host based on
|
||||
cores. For example, the virtual cores running on an instance may exceed the
|
||||
@ -371,6 +380,15 @@ With the API, use the ``os:scheduler_hints`` key. For example:
|
||||
DiskFilter
|
||||
----------
|
||||
|
||||
.. deprecated:: 19.0.0
|
||||
|
||||
``DiskFilter`` is deprecated since the 19.0.0 Stein release. DISK_GB
|
||||
filtering is performed natively using the Placement service when using the
|
||||
``filter_scheduler`` driver. Users of the ``caching_scheduler`` driver may
|
||||
still rely on this filter but the ``caching_scheduler`` driver is itself
|
||||
deprecated. Furthermore, enabling DiskFilter may incorrectly filter out
|
||||
`baremetal nodes`_ which must be scheduled using custom resource classes.
|
||||
|
||||
Only schedules instances on hosts if there is sufficient disk space available
|
||||
for root and ephemeral storage.
|
||||
|
||||
@ -612,6 +630,17 @@ device requests in the ``extra_specs`` attribute for the flavor.
|
||||
RamFilter
|
||||
---------
|
||||
|
||||
.. deprecated:: 19.0.0
|
||||
|
||||
``RamFilter`` is deprecated since the 19.0.0 Stein release. MEMORY_MB
|
||||
filtering is performed natively using the Placement service when using the
|
||||
``filter_scheduler`` driver. Users of the ``caching_scheduler`` driver may
|
||||
still rely on this filter but the ``caching_scheduler`` driver is itself
|
||||
deprecated. Furthermore, enabling RamFilter may incorrectly filter out
|
||||
`baremetal nodes`_ which must be scheduled using custom resource classes.
|
||||
|
||||
.. _baremetal nodes: https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html
|
||||
|
||||
Only schedules instances on hosts that have sufficient RAM available. If this
|
||||
filter is not set, the scheduler may over provision a host based on RAM (for
|
||||
example, the RAM allocated by virtual machine instances may exceed the physical
|
||||
|
@ -137,7 +137,7 @@ For example:
|
||||
firewall_driver=nova.virt.firewall.NoopFirewallDriver
|
||||
|
||||
[filter_scheduler]
|
||||
enabled_filters=RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter,NUMATopologyFilter
|
||||
enabled_filters=ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter,NUMATopologyFilter
|
||||
EOF
|
||||
$ FORCE=yes ./stack.sh
|
||||
|
||||
|
@ -95,8 +95,8 @@ 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.
|
||||
* |CoreFilter| - filters based on CPU core utilization. It passes hosts with
|
||||
sufficient number of CPU cores.
|
||||
* |CoreFilter| - DEPRECATED; filters based on CPU core utilization. It passes
|
||||
hosts with sufficient number of CPU cores.
|
||||
* |AggregateCoreFilter| - filters hosts by CPU core number with per-aggregate
|
||||
``cpu_allocation_ratio`` setting. If no per-aggregate value is found, it will
|
||||
fall back to the global default ``cpu_allocation_ratio``. If more than one value
|
||||
@ -105,15 +105,15 @@ There are many standard filter classes which may be used
|
||||
* |IsolatedHostsFilter| - filter based on ``isolated_images``, ``isolated_hosts``
|
||||
and ``restrict_isolated_hosts_to_isolated_images`` flags.
|
||||
* |JsonFilter| - allows simple JSON-based grammar for selecting hosts.
|
||||
* |RamFilter| - filters hosts by their RAM. Only hosts with sufficient RAM
|
||||
to host the instance are passed.
|
||||
* |RamFilter| - DEPRECATED; filters hosts by their RAM. Only hosts with
|
||||
sufficient RAM to host the instance are passed.
|
||||
* |AggregateRamFilter| - filters hosts by RAM with per-aggregate
|
||||
``ram_allocation_ratio`` setting. If no per-aggregate value is found, it will
|
||||
fall back to the global default ``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.
|
||||
* |DiskFilter| - filters hosts by their disk allocation. Only hosts with sufficient
|
||||
disk space to host the instance are passed.
|
||||
* |DiskFilter| - DEPRECATED; filters hosts by their disk allocation. Only
|
||||
hosts with sufficient disk space to host the instance are passed.
|
||||
``disk_allocation_ratio`` setting. The virtual disk to physical disk
|
||||
allocation ratio, 1.0 by default. The total allowed allocated disk size will
|
||||
be physical disk multiplied this ratio.
|
||||
|
@ -76,7 +76,18 @@ class BaseCoreFilter(filters.BaseHostFilter):
|
||||
|
||||
|
||||
class CoreFilter(BaseCoreFilter):
|
||||
"""CoreFilter filters based on CPU core utilization."""
|
||||
"""DEPRECATED: CoreFilter filters based on CPU core utilization."""
|
||||
|
||||
def __init__(self):
|
||||
super(CoreFilter, self).__init__()
|
||||
LOG.warning('The CoreFilter is deprecated since the 19.0.0 Stein '
|
||||
'release. VCPU filtering is performed natively using the '
|
||||
'Placement service when using the filter_scheduler '
|
||||
'driver. Users of the caching_scheduler driver may still '
|
||||
'rely on this filter but the caching_scheduler driver is '
|
||||
'itself deprecated. Furthermore, enabling CoreFilter '
|
||||
'may incorrectly filter out baremetal nodes which must be '
|
||||
'scheduled using custom resource classes.')
|
||||
|
||||
def _get_cpu_allocation_ratio(self, host_state, spec_obj):
|
||||
return host_state.cpu_allocation_ratio
|
||||
|
@ -22,9 +22,23 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DiskFilter(filters.BaseHostFilter):
|
||||
"""Disk Filter with over subscription flag."""
|
||||
"""DEPRECATED: Disk Filter with over subscription flag."""
|
||||
|
||||
RUN_ON_REBUILD = False
|
||||
DEPRECATED = True
|
||||
|
||||
def __init__(self):
|
||||
super(DiskFilter, self).__init__()
|
||||
if self.DEPRECATED:
|
||||
LOG.warning('The DiskFilter is deprecated since the 19.0.0 Stein '
|
||||
'release. DISK_GB filtering is performed natively '
|
||||
'using the Placement service when using the '
|
||||
'filter_scheduler driver. Users of the '
|
||||
'caching_scheduler driver may still rely on this '
|
||||
'filter but the caching_scheduler driver is itself '
|
||||
'deprecated. Furthermore, enabling DiskFilter may '
|
||||
'incorrectly filter out baremetal nodes which must be '
|
||||
'scheduled using custom resource classes.')
|
||||
|
||||
def _get_disk_allocation_ratio(self, host_state, spec_obj):
|
||||
return host_state.disk_allocation_ratio
|
||||
@ -79,6 +93,7 @@ class AggregateDiskFilter(DiskFilter):
|
||||
"""
|
||||
|
||||
RUN_ON_REBUILD = False
|
||||
DEPRECATED = False
|
||||
|
||||
def _get_disk_allocation_ratio(self, host_state, spec_obj):
|
||||
aggregate_vals = utils.aggregate_values_from_key(
|
||||
|
@ -68,6 +68,18 @@ class BaseRamFilter(filters.BaseHostFilter):
|
||||
class RamFilter(BaseRamFilter):
|
||||
"""Ram Filter with over subscription flag."""
|
||||
|
||||
def __init__(self):
|
||||
super(RamFilter, self).__init__()
|
||||
LOG.warning('The RamFilter is deprecated since the 19.0.0 Stein '
|
||||
'release. MEMORY_MB filtering is performed natively '
|
||||
'using the Placement service when using the '
|
||||
'filter_scheduler driver. Users of the '
|
||||
'caching_scheduler driver may still rely on this '
|
||||
'filter but the caching_scheduler driver is itself '
|
||||
'deprecated. Furthermore, enabling RamFilter may '
|
||||
'incorrectly filter out baremetal nodes which must be '
|
||||
'scheduled using custom resource classes.')
|
||||
|
||||
def _get_ram_allocation_ratio(self, host_state, spec_obj):
|
||||
return host_state.ram_allocation_ratio
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``CoreFilter``, ``DiskFilter`` and ``RamFilter`` are now deprecated.
|
||||
VCPU, DISK_GB and MEMORY_MB filtering is performed natively using the
|
||||
Placement service when using the ``filter_scheduler`` driver. Users of the
|
||||
``caching_scheduler`` driver may still rely on these filters but the
|
||||
``caching_scheduler`` driver is itself deprecated. Furthermore, enabling
|
||||
these filters may incorrectly filter out baremetal nodes which must be
|
||||
`scheduled using custom resource classes <https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html>`_.
|
Loading…
x
Reference in New Issue
Block a user