Browse Source

Deprecate rabbitmq connection parameters

The rabbitmq connection parameters have been deprecated in favor of the
transport_url setting.

Change-Id: I04d9e09d30d4636773b2d64e7be27885cdb8775a
Related-Bug: #1625198
changes/66/391966/2
Alex Schultz 6 years ago
parent
commit
d77e7067de
  1. 76
      manifests/init.pp
  2. 7
      releasenotes/notes/rabbit-connection-params-deprecation-62caee6af8c19d29.yaml
  3. 6
      spec/acceptance/ceilometer_wsgi_apache_spec.rb

76
manifests/init.pp

@ -68,32 +68,7 @@
# amqp and zmq. (string value)
# Default to $::os_service_default
#
# [*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
#
# [*rabbit_ha_queues*]
# (Optional) Use HA queues in RabbitMQ (x-ha-policy: all). If you change this
# option, you must wipe the RabbitMQ database. (boolean value)
@ -229,6 +204,32 @@
#
# [*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
#
class ceilometer(
$http_timeout = '600',
$event_time_to_live = '-1',
@ -244,12 +245,6 @@ class ceilometer(
$default_transport_url = $::os_service_default,
$notification_transport_url = $::os_service_default,
$rpc_backend = $::os_service_default,
$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,
$rabbit_ha_queues = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
$rabbit_heartbeat_rate = $::os_service_default,
@ -282,6 +277,12 @@ class ceilometer(
# DEPRECATED PARAMETERS
$alarm_history_time_to_live = undef,
$metering_secret = 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,
) {
include ::ceilometer::logging
@ -305,6 +306,17 @@ class ceilometer(
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) {
warning("ceilometer::rabbit_host, ceilometer::rabbit_hosts, ceilometer::rabbit_password, \
ceilometer::rabbit_port, ceilometer::rabbit_userid and ceilometer::rabbit_virtual_host are \
deprecated. Please use ceilometer::default_transport_url instead.")
}
group { 'ceilometer':
name => 'ceilometer',
require => Package['ceilometer-common'],

7
releasenotes/notes/rabbit-connection-params-deprecation-62caee6af8c19d29.yaml

@ -0,0 +1,7 @@
---
deprecations:
- ceilometer::rabbit_host, ceilometer::rabbit_hosts,
ceilometer::rabbit_password, ceilometer::rabbit_port,
ceilometer::rabbit_userid and ceilometer::rabbit_virtual_host are
deprecated. ceilometer::default_transport_url should be used to configure
the messaging backend connection information.

6
spec/acceptance/ceilometer_wsgi_apache_spec.rb

@ -33,10 +33,8 @@ describe 'ceilometer with mysql' do
# Ceilometer resources
class { '::ceilometer':
telemetry_secret => 'secrete',
rabbit_userid => 'ceilometer',
rabbit_password => 'an_even_bigger_secret',
rabbit_host => '127.0.0.1',
telemetry_secret => 'secrete',
default_transport_url => 'rabbit://ceilometer:an_even_bigger_secret@127.0.0.1:5672',
}
class { '::ceilometer::db::mysql':
password => 'a_big_secret',

Loading…
Cancel
Save