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
This commit is contained in:
Takashi Kajinami 2022-06-13 17:08:13 +09:00
parent 7d37513d7e
commit c58c36d927
2 changed files with 9 additions and 4 deletions

View File

@ -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,

View File

@ -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('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('evaluator/evaluation_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/event_alarm_cache_ttl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('DEFAULT/additional_ingestion_lag').with_value('<SERVICE DEFAULT>')
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('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('evaluator/evaluation_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_aodh_config('evaluator/workers').with_value(4)
end
end