Set 'tenant_name_discovery' parameter in 'polling' section

As of now 'tenant_name_discovery'[1] is being configured in 'DEFAULT' section in ceilometer config file.

As per Ceilometer this must be configured as a polling option[2].

[1] https://github.com/openstack/ceilometer/blob/master/ceilometer/polling/manager.py#L69-L80
[2] https://github.com/openstack/ceilometer/blob/master/ceilometer/opts.py#L98

Change-Id: Ib5c273df325f5ed0dccf7f45a9c7a91aba9568c3
(cherry picked from commit 204a8b398d)
(cherry picked from commit 1a0803fa9c)
(cherry picked from commit 41830c41a7)
(cherry picked from commit 3f52e89caf)
This commit is contained in:
Yadnesh Kulkarni 2023-08-25 11:27:59 +05:30
parent 39e0c0730e
commit 78dbc6531f
2 changed files with 8 additions and 3 deletions

View File

@ -172,7 +172,12 @@ class ceilometer::agent::polling (
ceilometer_config {
'polling/batch_size': value => $batch_size;
'DEFAULT/tenant_name_discovery': value => $tenant_name_discovery;
'polling/tenant_name_discovery': value => $tenant_name_discovery;
}
# TODO(tkajinam): Remove this after 2024.1 release
ceilometer_config {
'DEFAULT/tenant_name_discovery': ensure => absent;
}
if $manage_service {

View File

@ -54,7 +54,7 @@ describe 'ceilometer::agent::polling' do
it { should contain_ceilometer_config('polling/batch_size').with_value('<SERVICE DEFAULT>') }
it { should_not contain_file('polling') }
it { should contain_ceilometer_config('DEFAULT/tenant_name_discovery').with_value('<SERVICE DEFAULT>') }
it { should contain_ceilometer_config('polling/tenant_name_discovery').with_value('<SERVICE DEFAULT>') }
end
context 'when setting package_ensure' do
@ -91,7 +91,7 @@ describe 'ceilometer::agent::polling' do
end
it {
should contain_ceilometer_config('DEFAULT/tenant_name_discovery').with_value(true)
should contain_ceilometer_config('polling/tenant_name_discovery').with_value(true)
}
end