Clean up deprecated scheduler parameters
Change-Id: I82a1ce85d7f0d793bb9ff57f69d085c3a88ef2f0
This commit is contained in:
@@ -79,12 +79,6 @@
|
|||||||
# compute hosts affined to routed network segment aggregates.
|
# compute hosts affined to routed network segment aggregates.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
#
|
|
||||||
# [*scheduler_driver*]
|
|
||||||
# (Optional) Default driver to use for the scheduler
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
class nova::scheduler(
|
class nova::scheduler(
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
@@ -100,8 +94,6 @@ class nova::scheduler(
|
|||||||
$enable_isolated_aggregate_filtering = $::os_service_default,
|
$enable_isolated_aggregate_filtering = $::os_service_default,
|
||||||
$query_placement_for_availability_zone = $::os_service_default,
|
$query_placement_for_availability_zone = $::os_service_default,
|
||||||
$query_placement_for_routed_network_aggregates = $::os_service_default,
|
$query_placement_for_routed_network_aggregates = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$scheduler_driver = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -117,15 +109,10 @@ class nova::scheduler(
|
|||||||
ensure_package => $ensure_package,
|
ensure_package => $ensure_package,
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(tkajinam): Remove this when we remove the deprecated parameters
|
|
||||||
# from the nova::scheduler::filter class
|
|
||||||
$max_attempts_real = pick($::nova::scheduler::filter::scheduler_max_attempts, $max_attempts)
|
|
||||||
$periodic_task_interval_real = pick($::nova::scheduler::filter::periodic_task_interval, $periodic_task_interval)
|
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
'scheduler/workers': value => $workers;
|
'scheduler/workers': value => $workers;
|
||||||
'scheduler/max_attempts': value => $max_attempts_real;
|
'scheduler/max_attempts': value => $max_attempts;
|
||||||
'scheduler/periodic_task_interval': value => $periodic_task_interval_real;
|
'scheduler/periodic_task_interval': value => $periodic_task_interval;
|
||||||
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
'scheduler/discover_hosts_in_cells_interval': value => $discover_hosts_in_cells_interval;
|
||||||
'scheduler/query_placement_for_image_type_support': value => $query_placement_for_image_type_support;
|
'scheduler/query_placement_for_image_type_support': value => $query_placement_for_image_type_support;
|
||||||
'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
'scheduler/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
|
||||||
@@ -135,16 +122,4 @@ class nova::scheduler(
|
|||||||
'scheduler/query_placement_for_availability_zone': value => $query_placement_for_availability_zone;
|
'scheduler/query_placement_for_availability_zone': value => $query_placement_for_availability_zone;
|
||||||
'scheduler/query_placement_for_routed_network_aggregates': value => $query_placement_for_routed_network_aggregates;
|
'scheduler/query_placement_for_routed_network_aggregates': value => $query_placement_for_routed_network_aggregates;
|
||||||
}
|
}
|
||||||
|
|
||||||
if $scheduler_driver != undef {
|
|
||||||
warning('The scheduler_driver parameter is deprecated and will be removed \
|
|
||||||
in a future release')
|
|
||||||
nova_config {
|
|
||||||
'scheduler/driver': value => $scheduler_driver;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
nova_config {
|
|
||||||
'scheduler/driver': ensure => absent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -96,23 +96,6 @@
|
|||||||
# (optional) Separator character(s) for image property namespace and name
|
# (optional) Separator character(s) for image property namespace and name
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
#
|
|
||||||
# [*scheduler_max_attempts*]
|
|
||||||
# (optional) Maximum number of attempts to schedule an instance
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*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
|
|
||||||
# determined by the particular scheduler being used.
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
# [*scheduler_default_filters*]
|
|
||||||
# (optional) An array of filters to be used by default
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
|
|
||||||
class nova::scheduler::filter (
|
class nova::scheduler::filter (
|
||||||
$scheduler_host_subset_size = $::os_service_default,
|
$scheduler_host_subset_size = $::os_service_default,
|
||||||
$max_io_ops_per_host = $::os_service_default,
|
$max_io_ops_per_host = $::os_service_default,
|
||||||
@@ -135,39 +118,18 @@ class nova::scheduler::filter (
|
|||||||
$restrict_isolated_hosts_to_isolated_images = $::os_service_default,
|
$restrict_isolated_hosts_to_isolated_images = $::os_service_default,
|
||||||
$aggregate_image_properties_isolation_namespace = $::os_service_default,
|
$aggregate_image_properties_isolation_namespace = $::os_service_default,
|
||||||
$aggregate_image_properties_isolation_separator = $::os_service_default,
|
$aggregate_image_properties_isolation_separator = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$scheduler_max_attempts = undef,
|
|
||||||
$periodic_task_interval = undef,
|
|
||||||
$scheduler_default_filters = undef,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
|
|
||||||
if $scheduler_max_attempts != undef {
|
|
||||||
warning('The nova::scheduler::filter::scheduler_max_attempts parameter has been deprecated and \
|
|
||||||
will be removed in a future release. Use the nova::scheduler::max_attempts parameter instead.')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $periodic_task_interval != undef {
|
|
||||||
warning('The nova::scheduler::filter::periodic_task_interval parameter has been deprecated and \
|
|
||||||
will be removed in a future release. Use the nova::scheduler::periodic_task_interval parameter instead.')
|
|
||||||
}
|
|
||||||
|
|
||||||
if $scheduler_default_filters != undef {
|
|
||||||
warning('The nova::scheduler::filter::scheduler_default_filters parameter has been deprecated and \
|
|
||||||
will be removed in a future release. Use the nova::scheduler::schedumer_enabled_filters parameter instead.')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# The following values are following this rule:
|
# The following values are following this rule:
|
||||||
# - default is $::os_service_default so Puppet won't try to configure it.
|
# - default is $::os_service_default so Puppet won't try to configure it.
|
||||||
# - if set, we'll validate it's an array that is not empty and configure the parameter.
|
# - if set, we'll validate it's an array that is not empty and configure the parameter.
|
||||||
# - Otherwise, fallback to default.
|
# - Otherwise, fallback to default.
|
||||||
|
|
||||||
$scheduler_enabled_filters_raw = pick($scheduler_default_filters, $scheduler_enabled_filters)
|
if !is_service_default($scheduler_enabled_filters) and !empty($scheduler_enabled_filters){
|
||||||
if !is_service_default($scheduler_enabled_filters_raw) and !empty($scheduler_enabled_filters_raw){
|
validate_legacy(Array, 'validate_array', $scheduler_enabled_filters)
|
||||||
validate_legacy(Array, 'validate_array', $scheduler_enabled_filters_raw)
|
$scheduler_enabled_filters_real = join($scheduler_enabled_filters, ',')
|
||||||
$scheduler_enabled_filters_real = join($scheduler_enabled_filters_raw, ',')
|
|
||||||
} else {
|
} else {
|
||||||
$scheduler_enabled_filters_real = $::os_service_default
|
$scheduler_enabled_filters_real = $::os_service_default
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The following deprecated parameters have been removed.
|
||||||
|
|
||||||
|
- ``nova::scheduler::scheduler_driver``
|
||||||
|
- ``nova::scheduler::filter::scheduler_max_attempts``
|
||||||
|
- ``nova::scheduler::filter::periodic_task_interval``
|
||||||
|
- ``nova::scheduler::filter::scheduler_default_filters``
|
@@ -20,7 +20,6 @@ describe 'nova::scheduler' do
|
|||||||
it { is_expected.to contain_nova_config('scheduler/workers').with_value(4) }
|
it { is_expected.to contain_nova_config('scheduler/workers').with_value(4) }
|
||||||
it { is_expected.to contain_nova_config('scheduler/max_attempts').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('scheduler/max_attempts').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('scheduler/driver').with_ensure('absent') }
|
|
||||||
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('scheduler/discover_hosts_in_cells_interval').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('scheduler/query_placement_for_image_type_support').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('scheduler/query_placement_for_image_type_support').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_nova_config('scheduler/limit_tenants_to_placement_aggregate').with_value('<SERVICE DEFAULT>') }
|
||||||
@@ -75,14 +74,6 @@ describe 'nova::scheduler' do
|
|||||||
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').with_value(300) }
|
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').with_value(300) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with scheduler driver' do
|
|
||||||
let :params do
|
|
||||||
{ :scheduler_driver => 'custom driver' }
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_nova_config('scheduler/driver').with_value('custom driver') }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with discover_hosts_in_cells_interval' do
|
context 'with discover_hosts_in_cells_interval' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :discover_hosts_in_cells_interval => 15 }
|
{ :discover_hosts_in_cells_interval => 15 }
|
||||||
|
Reference in New Issue
Block a user