Remove deprecated nova::scheduler::filter parameters
These were deprecated during the previous cycle because of shortened parameter names. Change-Id: I2a3e3ce2a9961258895ed20cddad7c4aa37d775f
This commit is contained in:
parent
17b3724ec8
commit
94bf78b04e
@ -104,25 +104,6 @@
|
|||||||
# (optional) Separator character(s) for image property namespace and name
|
# (optional) Separator character(s) for image property namespace and name
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# == DEPRECATED PARAMETERS ==
|
|
||||||
#
|
|
||||||
# [*scheduler_host_subset_size*]
|
|
||||||
# (optional) defines the subset size that a host is chosen from
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*scheduler_available_filters*]
|
|
||||||
# (optional) An array with filter classes available to the scheduler.
|
|
||||||
# Example: ['first.filter.class', 'second.filter.class']
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*scheduler_enabled_filters*]
|
|
||||||
# (optional) An array of filters to be used by default
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*scheduler_weight_classes*]
|
|
||||||
# (optional) Which weight class names to use for weighing hosts
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
class nova::scheduler::filter (
|
class nova::scheduler::filter (
|
||||||
$host_subset_size = $facts['os_service_default'],
|
$host_subset_size = $facts['os_service_default'],
|
||||||
$max_io_ops_per_host = $facts['os_service_default'],
|
$max_io_ops_per_host = $facts['os_service_default'],
|
||||||
@ -147,39 +128,20 @@ class nova::scheduler::filter (
|
|||||||
$restrict_isolated_hosts_to_isolated_images = $facts['os_service_default'],
|
$restrict_isolated_hosts_to_isolated_images = $facts['os_service_default'],
|
||||||
$aggregate_image_properties_isolation_namespace = $facts['os_service_default'],
|
$aggregate_image_properties_isolation_namespace = $facts['os_service_default'],
|
||||||
$aggregate_image_properties_isolation_separator = $facts['os_service_default'],
|
$aggregate_image_properties_isolation_separator = $facts['os_service_default'],
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$scheduler_host_subset_size = undef,
|
|
||||||
$scheduler_available_filters = undef,
|
|
||||||
$scheduler_enabled_filters = undef,
|
|
||||||
$scheduler_weight_classes = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
|
|
||||||
$host_subset_size_real = pick($scheduler_host_subset_size, $host_subset_size)
|
if empty($available_filters) {
|
||||||
$weight_classes_real = pick($scheduler_weight_classes, $weight_classes)
|
warning('available_filters is empty. Nova is deployed without filters')
|
||||||
|
|
||||||
$enabled_filters_pick = pick($scheduler_enabled_filters, $enabled_filters)
|
|
||||||
|
|
||||||
if is_service_default($enabled_filters_pick) {
|
|
||||||
$enabled_filters_real = $facts['os_service_default']
|
|
||||||
} elsif empty($enabled_filters_pick){
|
|
||||||
$enabled_filters_real = $facts['os_service_default']
|
|
||||||
} else {
|
|
||||||
$enabled_filters_real = join(any2array($enabled_filters_pick), ',')
|
|
||||||
}
|
}
|
||||||
|
if empty($enabled_filters) {
|
||||||
$available_filters_pick = pick($scheduler_available_filters, $available_filters)
|
warning('enabled_filters is empty. Nova is deployed without filters')
|
||||||
|
|
||||||
if empty($available_filters_pick) {
|
|
||||||
$available_filters_real = $facts['os_service_default']
|
|
||||||
} else {
|
|
||||||
$available_filters_real = $available_filters_pick
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'filter_scheduler/host_subset_size':
|
'filter_scheduler/host_subset_size':
|
||||||
value => $host_subset_size_real;
|
value => $host_subset_size;
|
||||||
'filter_scheduler/max_io_ops_per_host':
|
'filter_scheduler/max_io_ops_per_host':
|
||||||
value => $max_io_ops_per_host;
|
value => $max_io_ops_per_host;
|
||||||
'filter_scheduler/max_instances_per_host':
|
'filter_scheduler/max_instances_per_host':
|
||||||
@ -187,11 +149,11 @@ class nova::scheduler::filter (
|
|||||||
'filter_scheduler/track_instance_changes':
|
'filter_scheduler/track_instance_changes':
|
||||||
value => $track_instance_changes;
|
value => $track_instance_changes;
|
||||||
'filter_scheduler/available_filters':
|
'filter_scheduler/available_filters':
|
||||||
value => $available_filters_real;
|
value => $available_filters;
|
||||||
'filter_scheduler/weight_classes':
|
'filter_scheduler/weight_classes':
|
||||||
value => $weight_classes_real;
|
value => $weight_classes;
|
||||||
'filter_scheduler/enabled_filters':
|
'filter_scheduler/enabled_filters':
|
||||||
value => $enabled_filters_real;
|
value => join(any2array($enabled_filters), ',');
|
||||||
'filter_scheduler/isolated_images':
|
'filter_scheduler/isolated_images':
|
||||||
value => join(any2array($isolated_images), ',');
|
value => join(any2array($isolated_images), ',');
|
||||||
'filter_scheduler/isolated_hosts':
|
'filter_scheduler/isolated_hosts':
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The following ``nova::scheduler::filter`` class parameters have been
|
||||||
|
removed.
|
||||||
|
|
||||||
|
- ``scheduler_host_subset_size``
|
||||||
|
- ``scheduler_available_filters``
|
||||||
|
- ``scheduler_enabled_filters``
|
||||||
|
- ``scheduler_weight_classes``
|
||||||
|
|
||||||
|
- |
|
||||||
|
The following parameters of the ``nova::scheduler::filter`` class no longer
|
||||||
|
interpret empty value as the indicator of service defaults. In case
|
||||||
|
an empty value is passed, nova-scheduler may be deployed without available
|
||||||
|
or enabled scheduler filters.
|
||||||
|
|
||||||
|
- ``available_filters``
|
||||||
|
- ``enabled_filters``
|
@ -84,18 +84,6 @@ describe 'nova::scheduler::filter' do
|
|||||||
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('RetryFilter,AvailabilityZoneFilter') }
|
it { is_expected.to contain_nova_config('filter_scheduler/enabled_filters').with_value('RetryFilter,AvailabilityZoneFilter') }
|
||||||
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova_filter1','nova_filter2']) }
|
it { is_expected.to contain_nova_config('filter_scheduler/available_filters').with_value(['nova_filter1','nova_filter2']) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when overriding params with empty arrays' do
|
|
||||||
let :params do
|
|
||||||
{
|
|
||||||
:available_filters => [],
|
|
||||||
:enabled_filters => [],
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
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>') }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
Loading…
Reference in New Issue
Block a user