Remove references to Exact* filters
The nova-scheduler Exact* filters were deprecated in Pike and are being removed in Rocky. This removes the references to the Exact* filters. As a result, use_baremetal_filters=True is also removed since removing the Exact filters also means there would be no enabled baremetal filters, so use_baremetal_filters needs to be False (its default value). Depends-On: https://review.openstack.org/508886/ Change-Id: I16ec401a864d3732f952071b3858a6f60123276f
This commit is contained in:
parent
c691207480
commit
a7a132c636
|
@ -46,14 +46,6 @@
|
|||
# (optional) Which weight class names to use for weighing hosts
|
||||
# Defaults to 'nova.scheduler.weights.all_weighers'
|
||||
#
|
||||
# [*baremetal_scheduler_default_filters*]
|
||||
# (optional) An array of filters to be used by default for baremetal hosts
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*scheduler_use_baremetal_filters*]
|
||||
# (optional) Use baremetal_scheduler_default_filters or not.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*periodic_task_interval*]
|
||||
# (optional) This value controls how often (in seconds) to run periodic tasks
|
||||
# in the scheduler. The specific tasks that are run for each period are
|
||||
|
@ -99,6 +91,16 @@
|
|||
# (optional) Separator character(s) for image property namespace and name
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# [*baremetal_scheduler_default_filters*]
|
||||
# An array of filters to be used by default for baremetal hosts
|
||||
# No longer used. Defaults to undef
|
||||
#
|
||||
# [*scheduler_use_baremetal_filters*]
|
||||
# Use baremetal_scheduler_default_filters or not.
|
||||
# No longer used. Defaults to undef
|
||||
#
|
||||
class nova::scheduler::filter (
|
||||
$scheduler_host_manager = 'host_manager',
|
||||
$scheduler_max_attempts = '3',
|
||||
|
@ -110,8 +112,6 @@ class nova::scheduler::filter (
|
|||
$scheduler_available_filters = ['nova.scheduler.filters.all_filters'],
|
||||
$scheduler_default_filters = $::os_service_default,
|
||||
$scheduler_weight_classes = 'nova.scheduler.weights.all_weighers',
|
||||
$baremetal_scheduler_default_filters = $::os_service_default,
|
||||
$scheduler_use_baremetal_filters = false,
|
||||
$periodic_task_interval = $::os_service_default,
|
||||
$track_instance_changes = $::os_service_default,
|
||||
$ram_weight_multiplier = $::os_service_default,
|
||||
|
@ -122,6 +122,9 @@ class nova::scheduler::filter (
|
|||
$restrict_isolated_hosts_to_isolated_images = $::os_service_default,
|
||||
$aggregate_image_properties_isolation_namespace = $::os_service_default,
|
||||
$aggregate_image_properties_isolation_separator = $::os_service_default,
|
||||
# DEPRECATED
|
||||
$baremetal_scheduler_default_filters = undef,
|
||||
$scheduler_use_baremetal_filters = undef,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -148,12 +151,12 @@ class nova::scheduler::filter (
|
|||
$scheduler_available_filters_real = any2array($scheduler_available_filters)
|
||||
}
|
||||
|
||||
if !is_service_default($baremetal_scheduler_default_filters) and !empty($baremetal_scheduler_default_filters){
|
||||
validate_array($baremetal_scheduler_default_filters)
|
||||
$baremetal_scheduler_default_filters_real = join($baremetal_scheduler_default_filters, ',')
|
||||
} else {
|
||||
$baremetal_scheduler_default_filters_real = $::os_service_default
|
||||
if $baremetal_scheduler_default_filters or $scheduler_use_baremetal_filters {
|
||||
warning('The baremetal_scheduler_default_filters and \
|
||||
scheduler_use_baremetal_filters parameters are deprecated and will have \
|
||||
no effect. Baremetal scheduling now uses custom resource classes.')
|
||||
}
|
||||
|
||||
if !is_service_default($isolated_images) and !empty($isolated_images){
|
||||
validate_array($isolated_images)
|
||||
$isolated_images_real = join($isolated_images, ',')
|
||||
|
@ -187,12 +190,8 @@ class nova::scheduler::filter (
|
|||
value => $scheduler_available_filters_real;
|
||||
'filter_scheduler/weight_classes':
|
||||
value => $scheduler_weight_classes;
|
||||
'filter_scheduler/use_baremetal_filters':
|
||||
value => $scheduler_use_baremetal_filters;
|
||||
'filter_scheduler/enabled_filters':
|
||||
value => $scheduler_default_filters_real;
|
||||
'filter_scheduler/baremetal_enabled_filters':
|
||||
value => $baremetal_scheduler_default_filters_real;
|
||||
'filter_scheduler/isolated_images':
|
||||
value => $isolated_images_real;
|
||||
'filter_scheduler/isolated_hosts':
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
The nova scheduler baremetal Exact* filters have now been removed.
|
||||
As a result the following parameters are now deprecated and have
|
||||
no effect:
|
||||
|
||||
``nova::scheduler::filter::baremetal_scheduler_default_filter``
|
||||
``nova::scheduler::filter::scheduler_use_baremetal_filters``
|
||||
|
||||
Baremetal scheduling will use the custom resource class defined for
|
||||
each baremetal node to make its selection. Refer to the ironic
|
||||
documentation for more details:
|
||||
|
||||
https://docs.openstack.org/ironic/latest/install/configure-nova-flavors.html#scheduling-resource-classes
|
|
@ -17,11 +17,9 @@ describe 'nova::scheduler::filter' do
|
|||
it { is_expected.to contain_nova_config('filter_scheduler/max_instances_per_host').with_value('50') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova.scheduler.filters.all_filters']) }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/weight_classes').with_value('nova.scheduler.weights.all_weighers') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/use_baremetal_filters').with_value(false) }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_images').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_hosts').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/baremetal_enabled_filters').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/track_instance_changes').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/ram_weight_multiplier').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/disk_weight_multiplier').with_value('<SERVICE DEFAULT>') }
|
||||
|
@ -32,6 +30,8 @@ describe 'nova::scheduler::filter' do
|
|||
it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_namespace').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/aggregate_image_properties_isolation_separator').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
it { is_expected.to_not contain_nova_config('filter_scheduler/use_baremetal_filters') }
|
||||
it { is_expected.to_not contain_nova_config('filter_scheduler/baremetal_enabled_filters') }
|
||||
end
|
||||
|
||||
context 'when overriding params with non-empty arrays' do
|
||||
|
@ -40,8 +40,6 @@ describe 'nova::scheduler::filter' do
|
|||
:isolated_images => ['ubuntu1','centos2'],
|
||||
:isolated_hosts => ['192.168.1.2','192.168.1.3'],
|
||||
:scheduler_default_filters => ['RetryFilter','AvailabilityZoneFilter','RamFilter'],
|
||||
:scheduler_use_baremetal_filters => true,
|
||||
:baremetal_scheduler_default_filters => ['ExactRamFilter','ExactDiskFilter','ExactCoreFilter'],
|
||||
:scheduler_available_filters => ['nova_filter1','nova_filter2']
|
||||
}
|
||||
end
|
||||
|
@ -50,25 +48,34 @@ describe 'nova::scheduler::filter' do
|
|||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_images').with_value('ubuntu1,centos2') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_hosts').with_value('192.168.1.2,192.168.1.3') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('RetryFilter,AvailabilityZoneFilter,RamFilter') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/use_baremetal_filters').with_value(true) }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/baremetal_enabled_filters').with_value('ExactRamFilter,ExactDiskFilter,ExactCoreFilter') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova_filter1','nova_filter2']) }
|
||||
end
|
||||
|
||||
context 'when overriding deprecated params' do
|
||||
let :params do
|
||||
{
|
||||
:scheduler_use_baremetal_filters => true,
|
||||
:baremetal_scheduler_default_filters => ['ExactRamFilter','ExactDiskFilter','ExactCoreFilter'],
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to_not contain_nova_config('filter_scheduler/use_baremetal_filters') }
|
||||
it { is_expected.to_not contain_nova_config('filter_scheduler/baremetal_enabled_filters') }
|
||||
end
|
||||
|
||||
context 'when overriding params with empty arrays' do
|
||||
let :params do
|
||||
{ :isolated_images => [],
|
||||
:isolated_hosts => [],
|
||||
:scheduler_available_filters => [],
|
||||
:scheduler_default_filters => [],
|
||||
:baremetal_scheduler_default_filters => [], }
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_images').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/isolated_hosts').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_nova_config('filter_scheduler/baremetal_enabled_filters').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue