From c58c36d92741bd41fda663d5765d9136399a77b5 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 13 Jun 2022 17:08:13 +0900 Subject: [PATCH] Update section of the evaluation_interval parameter The evaluation_interval parameter in the [DEFAULT] section has been deprecated and it was migrated to the [evaluator] section. This change updates the parameter section accordingly. Depends-on: https://review.opendev.org/837864 Change-Id: If41e9e21771ea236ec18379790fe5427dcb6e8af --- manifests/evaluator.pp | 7 ++++++- spec/classes/aodh_evaluator_spec.rb | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/manifests/evaluator.pp b/manifests/evaluator.pp index 95b577b8..49a9b306 100644 --- a/manifests/evaluator.pp +++ b/manifests/evaluator.pp @@ -57,12 +57,17 @@ class aodh::evaluator ( } aodh_config { - 'DEFAULT/evaluation_interval': value => $evaluation_interval; + 'evaluator/evaluation_interval': value => $evaluation_interval; 'DEFAULT/event_alarm_cache_ttl': value => $event_alarm_cache_ttl; 'DEFAULT/additional_ingestion_lag': value => $additional_ingestion_lag; 'evaluator/workers': value => $workers; } + # TODO(tkajinam): Remove this after Zed release. + aodh_config { + 'DEFAULT/evaluation_interval': ensure => absent; + } + package { 'aodh-evaluator': ensure => $package_ensure, name => $::aodh::params::evaluator_package_name, diff --git a/spec/classes/aodh_evaluator_spec.rb b/spec/classes/aodh_evaluator_spec.rb index b7490ed6..5b8f8b4c 100644 --- a/spec/classes/aodh_evaluator_spec.rb +++ b/spec/classes/aodh_evaluator_spec.rb @@ -11,7 +11,7 @@ describe 'aodh::evaluator' do context 'with defaults' do it 'configures defaults' do is_expected.to contain_aodh_config('evaluator/workers').with_value(4) - is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value('') + is_expected.to contain_aodh_config('evaluator/evaluation_interval').with_value('') is_expected.to contain_aodh_config('DEFAULT/event_alarm_cache_ttl').with_value('') is_expected.to contain_aodh_config('DEFAULT/additional_ingestion_lag').with_value('') end @@ -36,7 +36,7 @@ describe 'aodh::evaluator' do }) end it 'configures parameters accordingly' do - is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value(10) + is_expected.to contain_aodh_config('evaluator/evaluation_interval').with_value(10) is_expected.to contain_aodh_config('DEFAULT/event_alarm_cache_ttl').with_value(60) is_expected.to contain_aodh_config('DEFAULT/additional_ingestion_lag').with_value(20) end @@ -75,7 +75,7 @@ describe 'aodh::evaluator' do end it 'sets default values' do - is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value('') + is_expected.to contain_aodh_config('evaluator/evaluation_interval').with_value('') is_expected.to contain_aodh_config('evaluator/workers').with_value(4) end end