Browse Source

Merge "Deprecate support for [scheduler] periodic_task_interval"

changes/37/788637/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
5f2e534936
3 changed files with 24 additions and 17 deletions
  1. +18
    -8
      manifests/scheduler.pp
  2. +5
    -0
      releasenotes/notes/deprecate-scheduler-periodic_task_interval-ca35e588c0cbe546.yaml
  3. +1
    -9
      spec/classes/nova_scheduler_spec.rb

+ 18
- 8
manifests/scheduler.pp View File

@ -24,12 +24,6 @@
# (optional) Maximum number of attempts to schedule an instance
# Defaults to $::os_service_default
#
# [*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 $::os_service_default
#
# [*discover_hosts_in_cells_interval*]
# (Optional) This value controls how often (in seconds) the scheduler should
# attempt to discover new hosts that have been added to cells.
@ -79,13 +73,20 @@
# compute hosts affined to routed network segment aggregates.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*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
#
class nova::scheduler(
$enabled = true,
$manage_service = true,
$ensure_package = 'present',
$workers = $::os_workers,
$max_attempts = $::os_service_default,
$periodic_task_interval = $::os_service_default,
$discover_hosts_in_cells_interval = $::os_service_default,
$query_placement_for_image_type_support = $::os_service_default,
$limit_tenants_to_placement_aggregate = $::os_service_default,
@ -94,6 +95,8 @@ class nova::scheduler(
$enable_isolated_aggregate_filtering = $::os_service_default,
$query_placement_for_availability_zone = $::os_service_default,
$query_placement_for_routed_network_aggregates = $::os_service_default,
# DEPRECATED PARAMETERS
$periodic_task_interval = undef,
) {
include nova::deps
@ -101,6 +104,10 @@ class nova::scheduler(
include nova::params
include nova::availability_zone
if $periodic_task_interval != undef {
warning('The periodic_task_interval parameter is depreated and has no effect')
}
nova::generic_service { 'scheduler':
enabled => $enabled,
manage_service => $manage_service,
@ -112,7 +119,6 @@ class nova::scheduler(
nova_config {
'scheduler/workers': value => $workers;
'scheduler/max_attempts': value => $max_attempts;
'scheduler/periodic_task_interval': value => $periodic_task_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/limit_tenants_to_placement_aggregate': value => $limit_tenants_to_placement_aggregate;
@ -122,4 +128,8 @@ class nova::scheduler(
'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;
}
nova_config {
'scheduler/periodic_task_interval': ensure => absent;
}
}

+ 5
- 0
releasenotes/notes/deprecate-scheduler-periodic_task_interval-ca35e588c0cbe546.yaml View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``nova::scheduler::periodic_task_interval`` parameter has been
deprecated and has no effect now.

+ 1
- 9
spec/classes/nova_scheduler_spec.rb View File

@ -19,7 +19,7 @@ describe 'nova::scheduler' do
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/periodic_task_interval').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').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/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>') }
@ -66,14 +66,6 @@ describe 'nova::scheduler' do
it { is_expected.to contain_nova_config('scheduler/max_attempts').with_value(10) }
end
context 'with periodic_task_interval' do
let :params do
{ :periodic_task_interval => 300 }
end
it { is_expected.to contain_nova_config('scheduler/periodic_task_interval').with_value(300) }
end
context 'with discover_hosts_in_cells_interval' do
let :params do
{ :discover_hosts_in_cells_interval => 15 }


Loading…
Cancel
Save