Forcefully purge [hardware] readonly_user_* parameters

This is follow-up of e5ce40b16d and now
enforces that the parameters are removed from ceilometer.conf because
these were already removed from ceilometer and no longer used.

Depends-on: https://review.opendev.org/840808
Change-Id: I4d9196133ead84d4b388929231ce970882fcaaa6
This commit is contained in:
Takashi Kajinami 2022-09-08 00:02:36 +09:00
parent 3cee14c87f
commit 1dcdea2e62
3 changed files with 11 additions and 15 deletions

View File

@ -272,10 +272,8 @@ class ceilometer(
include ceilometer::params
if $snmpd_readonly_username != undef or $snmpd_readonly_user_password != undef {
warning('The snmpd_readonly_* parameters have been deprecated.')
warning('The snmpd_readonly_* parameters have been deprecated and have no effect.')
}
$snmpd_readonly_username_real = pick($snmpd_readonly_username, $::os_service_default)
$snmpd_readonly_user_password_real = pick($snmpd_readonly_user_password, $::os_service_default)
package { 'ceilometer-common':
ensure => $package_ensure,
@ -326,12 +324,15 @@ class ceilometer(
# Once we got here, we can act as an honey badger on the rpc used.
ceilometer_config {
'DEFAULT/http_timeout' : value => $http_timeout;
'DEFAULT/max_parallel_requests' : value => $max_parallel_requests;
'DEFAULT/host' : value => $host;
'publisher/telemetry_secret' : value => $telemetry_secret, secret => true;
'hardware/readonly_user_name' : value => $snmpd_readonly_username_real;
'hardware/readonly_user_password': value => $snmpd_readonly_user_password_real, secret => true;
'DEFAULT/http_timeout' : value => $http_timeout;
'DEFAULT/max_parallel_requests': value => $max_parallel_requests;
'DEFAULT/host' : value => $host;
'publisher/telemetry_secret' : value => $telemetry_secret, secret => true;
}
# TODO(tkajinam): Remove this after Zed
ceilometer_config {
'hardware/readonly_user_name' : ensure => absent;
'hardware/readonly_user_password': ensure => absent, secret => true;
}
oslo::messaging::notifications { 'ceilometer_config':

View File

@ -2,7 +2,7 @@
deprecations:
- |
The following parameters of the ``ceilometer`` class have been deprecated
and will be removed in a future release.
and have no effect now. These will be removed in a future release.
- ``snmpd_readonly_user_name``
- ``snmpd_readonly_user_password``

View File

@ -100,11 +100,6 @@ describe 'ceilometer' do
)
end
it 'configures snmpd auth' do
is_expected.to contain_ceilometer_config('hardware/readonly_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('hardware/readonly_user_password').with_value('<SERVICE DEFAULT>').with_secret(true)
end
context 'with rabbitmq durable queues configured' do
before { params.merge!( :amqp_durable_queues => true ) }
it_configures 'rabbit with durable queues'