Deprecate Aggregate[CPU|Ram|Disk]Filters
Their functionality has been replace by placement API so these filters should no longer used. Change-Id: I0e7c42fcc907571cba84b1147e63767ccad9088e
This commit is contained in:
parent
d8b7b01d76
commit
1f10576673
@ -0,0 +1,7 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``CPUFilter``, ``RamFilter`` and
|
||||
``DiskFilter`` 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.
|
@ -64,10 +64,7 @@ Related options:
|
||||
cfg.ListOpt("enabled_filters",
|
||||
default=[
|
||||
"AvailabilityZoneFilter",
|
||||
"CPUFilter",
|
||||
"RamFilter",
|
||||
"ComputeFilter",
|
||||
"DiskFilter",
|
||||
"RuntimeFilter",
|
||||
],
|
||||
help="""
|
||||
|
@ -21,10 +21,19 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CPUFilter(filters.BaseHostFilter):
|
||||
"""Filter the containers by cpu request"""
|
||||
"""DEPRECATED: Filter the containers by cpu request"""
|
||||
|
||||
run_filter_once_per_request = True
|
||||
|
||||
def __init__(self):
|
||||
super(CPUFilter, self).__init__()
|
||||
LOG.warning('The CPUFilter is deprecated since the 7.0.0 '
|
||||
'Wallaby 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 zun.conf '
|
||||
'or via the placement API.')
|
||||
|
||||
def host_passes(self, host_state, container, extra_spec):
|
||||
if not container.cpu:
|
||||
return True
|
||||
|
@ -21,10 +21,19 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DiskFilter(filters.BaseHostFilter):
|
||||
"""Filter the containers by disk request"""
|
||||
"""DEPRECATED: Filter the containers by disk request"""
|
||||
|
||||
run_filter_once_per_request = True
|
||||
|
||||
def __init__(self):
|
||||
super(DiskFilter, self).__init__()
|
||||
LOG.warning('The DiskFilter is deprecated since the 7.0.0 '
|
||||
'Wallaby 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 zun.conf '
|
||||
'or via the placement API.')
|
||||
|
||||
def host_passes(self, host_state, container, extra_spec):
|
||||
if not hasattr(container, 'disk') or not container.disk:
|
||||
return True
|
||||
|
@ -21,10 +21,19 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RamFilter(filters.BaseHostFilter):
|
||||
"""Filter the containers by memory request"""
|
||||
"""DEPRECATED: Filter the containers by memory request"""
|
||||
|
||||
run_filter_once_per_request = True
|
||||
|
||||
def __init__(self):
|
||||
super(RamFilter, self).__init__()
|
||||
LOG.warning('The RamFilter is deprecated since the 7.0.0 '
|
||||
'Wallaby 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 zun.conf '
|
||||
'or via the placement API.')
|
||||
|
||||
def host_passes(self, host_state, container, extra_spec):
|
||||
if not container.memory:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user