Browse Source

Remove deprecated parameters

Removes deprecated parameters that has been
deprecated for one cycle or more.

Depends-On: https://review.openstack.org/#/c/569612/
Change-Id: I643c7e690713e8860be30ea21c7d6632fe87e68d
changes/08/569608/3
Tobias Urdin 4 years ago
parent
commit
7ba0dd422f
  1. 85
      manifests/init.pp
  2. 14
      releasenotes/notes/ceilometer-remove-deprecated-45e4418b3b134ec2.yaml
  3. 59
      spec/classes/ceilometer_init_spec.rb

85
manifests/init.pp

@ -228,46 +228,6 @@
# IP address.
# Defaults to $::os_service_default.
#
#
# === DEPRECATED PARAMETERS:
# [*alarm_history_time_to_live*]
#
# [*rabbit_host*]
# (Optional) The RabbitMQ broker address where a single node is used.
# (string value)
# Defaults to $::os_service_default
#
# [*rabbit_port*]
# (Optional) The RabbitMQ broker port where a single node is used.
# (port value)
# Defaults to $::os_service_default
#
# [*rabbit_hosts*]
# (Optional) RabbitMQ HA cluster host:port pairs. (array value)
# Defaults to $::os_service_default
#
# [*rabbit_userid*]
# (Optional) The RabbitMQ userid. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_password*]
# (Optional) The RabbitMQ password. (string value)
# Defaults to $::os_service_default
#
# [*rabbit_virtual_host*]
# (Optional) The RabbitMQ virtual host. (string value)
# Defaults to $::os_service_default
#
# [*memcached_servers*]
# (Optional) A list of memcached server(s) to use for caching. (list value)
# Defaults to $::os_service_default
#
# [*rpc_backend*]
# (optional) The messaging driver to use, defaults to rabbit. Other drivers include
# amqp and zmq. (string value)
# Default to $::os_service_default
#
class ceilometer(
$http_timeout = '600',
$event_time_to_live = '-1',
@ -319,48 +279,12 @@ class ceilometer(
$snmpd_readonly_user_password = $::os_service_default,
$purge_config = false,
$host = $::os_service_default,
# DEPRECATED PARAMETERS
$alarm_history_time_to_live = undef,
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_hosts = $::os_service_default,
$rabbit_userid = $::os_service_default,
$rabbit_password = $::os_service_default,
$rabbit_virtual_host = $::os_service_default,
$memcached_servers = undef,
$rpc_backend = $::os_service_default,
) {
include ::ceilometer::deps
include ::ceilometer::logging
include ::ceilometer::params
if $alarm_history_time_to_live {
warning('alarm_history_time_to_live parameter is deprecated. It should be configured for Aodh.')
}
if !is_service_default($rabbit_host) or
!is_service_default($rabbit_hosts) or
!is_service_default($rabbit_password) or
!is_service_default($rabbit_port) or
!is_service_default($rabbit_userid) or
!is_service_default($rabbit_virtual_host) or
!is_service_default($rpc_backend) {
warning("ceilometer::rabbit_host, ceilometer::rabbit_hosts, ceilometer::rabbit_password, \
ceilometer::rabbit_port, ceilometer::rabbit_userid, ceilometer::rabbit_virtual_host and \
ceilometer::rpc_backend are deprecated. Please use ceilometer::default_transport_url \
instead.")
}
if $memcached_servers {
warning("memcached_servers parameter is deprecated and will be removed in the future release, \
please use memcache_servers instead.")
$memcache_servers_real = $memcached_servers
}
else {
$memcache_servers_real = $memcache_servers
}
group { 'ceilometer':
ensure => present,
name => 'ceilometer',
@ -385,14 +309,7 @@ please use memcache_servers instead.")
purge => $purge_config,
}
oslo::messaging::rabbit {'ceilometer_config':
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_hosts => $rabbit_hosts,
rabbit_userid => $rabbit_userid,
rabbit_password => $rabbit_password,
rabbit_virtual_host => $rabbit_virtual_host,
rabbit_ha_queues => $rabbit_ha_queues,
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
heartbeat_rate => $rabbit_heartbeat_rate,
@ -451,6 +368,6 @@ please use memcache_servers instead.")
}
oslo::cache { 'ceilometer_config':
memcache_servers => $memcache_servers_real,
memcache_servers => $memcache_servers,
}
}

14
releasenotes/notes/ceilometer-remove-deprecated-45e4418b3b134ec2.yaml

@ -0,0 +1,14 @@
---
upgrade:
- |
The deprecated parameters ceilometer::rabbit_host, ceilometer::rabbit_hosts, ceilometer::rabbit_password,
ceilometer::rabbit_port, ceilometer::rabbit_userid and ceilometer::rabbit_virtual_host is removed.
Please use ceilometer::default_transport_url instead.
- |
The deprecated parameter ceilometer::rpc_backend is removed.
- |
The deprecated parameter ceilometer::alarm_history_time_to_live is removed.
Please configure this in Aodh instead.
- |
The deprecated parameter ceilometer::memcached_servers is removed.
Please use ceilometer::memcache_servers instead.

59
spec/classes/ceilometer_init_spec.rb

@ -19,10 +19,6 @@ describe 'ceilometer' do
let :rabbit_params do
{
:rabbit_host => '127.0.0.1',
:rabbit_port => 5672,
:rabbit_userid => 'guest',
:rabbit_password => '',
:rabbit_qos_prefetch_count => 10,
}
end
@ -42,7 +38,7 @@ describe 'ceilometer' do
is_expected.to contain_ceilometer_config('DEFAULT/host').with_value(params[:host])
end
context 'with rabbit_host parameter' do
context 'with rabbit parameters' do
before { params.merge!( rabbit_params ) }
it_configures 'a ceilometer base installation'
it_configures 'rabbit with SSL support'
@ -56,21 +52,14 @@ describe 'ceilometer' do
end
context 'with rabbit_hosts parameter' do
context 'with rabbit parameters' do
context 'with one server' do
before { params.merge!( rabbit_params ).merge!( :rabbit_hosts => ['127.0.0.1:5672'] ) }
before { params.merge!( rabbit_params ) }
it_configures 'a ceilometer base installation'
it_configures 'rabbit with SSL support'
it_configures 'rabbit without HA support (without backward compatibility)'
end
context 'with multiple servers' do
before { params.merge!( rabbit_params ).merge!( :rabbit_hosts => ['rabbit1:5672', 'rabbit2:5672'] ) }
it_configures 'a ceilometer base installation'
it_configures 'rabbit with SSL support'
it_configures 'rabbit with HA support'
end
end
context 'with amqp messaging' do
@ -200,18 +189,11 @@ describe 'ceilometer' do
shared_examples_for 'rabbit without HA support (with backward compatibility)' do
it 'configures rabbit' do
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
end
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_host').with_value( params[:rabbit_host] ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_port').with_value( params[:rabbit_port] ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>') }
@ -220,18 +202,11 @@ describe 'ceilometer' do
shared_examples_for 'rabbit without HA support (without backward compatibility)' do
it 'configures rabbit' do
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
end
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_hosts').with_value( params[:rabbit_hosts].join(',') ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>') }
@ -244,24 +219,6 @@ describe 'ceilometer' do
end
end
shared_examples_for 'rabbit with HA support' do
it 'configures rabbit' do
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
end
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_qos_prefetch_count').with_value( params[:rabbit_qos_prefetch_count] ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_hosts').with_value( params[:rabbit_hosts].join(',') ) }
it { is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) }
end
shared_examples_for 'rabbit with durable queues' do
it 'in ceilometer' do
is_expected.to contain_ceilometer_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true)
@ -356,16 +313,6 @@ describe 'ceilometer' do
end
end
shared_examples_for 'memcached support' do
context "with memcached enabled" do
before { params.merge!(
:memcached_servers => ['1.2.3.4','1.2.3.5']
) }
it { is_expected.to contain_ceilometer_config('DEFAULT/memcached_servers').with_value('1.2.3.4,1.2.3.5') }
end
end
shared_examples_for 'amqp support' do
context 'with default parameters' do
it { is_expected.to contain_ceilometer_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>') }

Loading…
Cancel
Save