Remove deprecated rabbit params in guestagent

This revemos the deprecated options rabbit_host,
rabbit_hosts and rabbit_port params in the
trove::guestagent class.

Changes the guestagent config file to use the
transport_url instead of the rabbit options. [1]

[1] https://review.openstack.org/#/c/609981/

Change-Id: I2f102eb15fe59459ab1eed2e4cf87ad3c54d5c78
This commit is contained in:
Tobias Urdin 2018-10-21 18:03:30 +02:00
parent ca483a625b
commit 08f3eca1ee
3 changed files with 28 additions and 107 deletions

View File

@ -86,63 +86,31 @@
# (Optional) Moved to init.pp. The default exchange to scope topics.
# Defaults to undef.
#
# [*rabbit_hosts*]
# (optional) List of clustered rabbit servers.
# Defaults to the value set in the trove class.
# The default can generally be left unless the
# guests need to talk to the rabbit cluster via
# different IPs.
#
# [*rabbit_host*]
# (optional) Location of rabbitmq installation.
# Defaults to the value set in the trove class.
# The default can generally be left unless the
# guests need to talk to the rabbit cluster via
# a different IP.
#
# [*rabbit_port*]
# (optional) Port for rabbitmq instance.
# Defaults to the value set in the trove class.
# The default can generally be left unless the
# guests need to talk to the rabbit cluster via
# a different port.
#
class trove::guestagent(
$enabled = true,
$manage_service = true,
$package_ensure = 'present',
$debug = $::os_service_default,
$log_file = '/var/log/trove/trove-guestagent.log',
$log_dir = '/var/log/trove',
$use_syslog = $::os_service_default,
$log_facility = $::os_service_default,
$auth_url = 'http://localhost:5000/v3',
$swift_url = $::os_service_default,
$swift_service_type = $::os_service_default,
$default_transport_url = $::trove::default_transport_url,
$rabbit_use_ssl = $::trove::rabbit_use_ssl,
$root_grant = $::os_service_default,
$root_grant_option = $::os_service_default,
$default_password_length = $::os_service_default,
$backup_aes_cbc_key = $::os_service_default,
$enabled = true,
$manage_service = true,
$package_ensure = 'present',
$debug = $::os_service_default,
$log_file = '/var/log/trove/trove-guestagent.log',
$log_dir = '/var/log/trove',
$use_syslog = $::os_service_default,
$log_facility = $::os_service_default,
$auth_url = 'http://localhost:5000/v3',
$swift_url = $::os_service_default,
$swift_service_type = $::os_service_default,
$default_transport_url = $::trove::default_transport_url,
$rabbit_use_ssl = $::trove::rabbit_use_ssl,
$root_grant = $::os_service_default,
$root_grant_option = $::os_service_default,
$default_password_length = $::os_service_default,
$backup_aes_cbc_key = $::os_service_default,
#Deprecated
$control_exchange = undef,
$rabbit_hosts = $::trove::rabbit_hosts,
$rabbit_host = $::trove::rabbit_host,
$rabbit_port = $::trove::rabbit_port,
$control_exchange = undef,
) inherits trove {
include ::trove::deps
include ::trove::params
if !is_service_default($rabbit_host) or
!is_service_default($rabbit_hosts) or
!is_service_default($rabbit_port) {
warning("trove::guestagent::rabbit_host, trove::guestagent::rabbit_hosts, \
and trove::guestagent::rabbit_port are deprecated. Please use \
trove::guestagent::default_transport_url instead.")
}
if $control_exchange {
warning("control_exchange parameter is deprecated. Please use \
trove::control_exchange instead.")
@ -182,14 +150,8 @@ trove::control_exchange instead.")
}
oslo::messaging::rabbit {'trove_guestagent_config':
rabbit_hosts => $rabbit_hosts,
rabbit_host => $rabbit_host,
rabbit_port => $rabbit_port,
rabbit_use_ssl => $rabbit_use_ssl,
rabbit_ha_queues => $::trove::rabbit_ha_queues,
rabbit_userid => $::trove::rabbit_userid,
rabbit_password => $::trove::rabbit_password,
rabbit_virtual_host => $::trove::rabbit_virtual_host,
kombu_reconnect_delay => $::trove::kombu_reconnect_delay,
kombu_failover_strategy => $::trove::kombu_failover_strategy,
amqp_durable_queues => $::trove::amqp_durable_queues,

View File

@ -0,0 +1,9 @@
---
fixes:
- |
The guestagent config now sets the transport_url instead of the removed
rabbit options.
upgrade:
- |
The deprecated rabbit_host, rabbit_hosts and rabbit_port parameters in
trove::guestagent is now removed, please use default_transport_url instead.

View File

@ -5,7 +5,7 @@
# URL representing the messaging driver to use and its full configuration.
# If not set, we fall back to the 'rpc_backend' option and driver specific
# configuration.
#transport_url=<None>
transport_url = <%= @default_transport_url %>
# The messaging driver to use. Options include rabbit and zmq.
# Default is rabbit. (string value)
@ -72,56 +72,6 @@ backup_segment_max_size = 2147483648
[oslo_messaging_rabbit]
# ============ RabbitMQ connection options ========================
<%- if @rabbit_hosts and @rabbit_hosts != "<SERVICE DEFAULT>" -%>
# RabbitMQ HA cluster host:port pairs. (list value)
rabbit_hosts=<%= @rabbit_hosts.join(',') %>
# The RabbitMQ broker address where a single node is used.
# (string value)
#rabbit_host=localhost
# The RabbitMQ broker port where a single node is used.
# (integer value)
#rabbit_port=5672
<%- else -%>
# The RabbitMQ broker address where a single node is used.
# (string value)
<%- if @rabbit_host and @rabbit_host != "<SERVICE DEFAULT>" -%>
rabbit_host=<%= @rabbit_host %>
<%- else -%>
#rabbit_host=localhost
<%- end -%>
# The RabbitMQ broker port where a single node is used.
# (integer value)
<%- if @rabbit_port and @rabbit_port != "<SERVICE DEFAULT>" -%>
rabbit_port=<%= @rabbit_port %>
<%- else -%>
#rabbit_port=5672
<%- end -%>
<%- end -%>
# The RabbitMQ userid. (string value)
<%- if @rabbit_userid and @rabbit_userid != "<SERVICE DEFAULT>" -%>
rabbit_userid=<%= @rabbit_userid %>
<%- else -%>
#rabbit_userid=guest
<%- end -%>
# The RabbitMQ password. (string value)
<%- if @rabbit_password and @rabbit_password != "<SERVICE DEFAULT>" -%>
rabbit_password=<%= @rabbit_password %>
<%- else -%>
#rabbit_password=guest
<%- end -%>
# The RabbitMQ virtual host. (string value)
<%- if @rabbit_virtual_host and @rabbit_virtual_host != "<SERVICE DEFAULT>" -%>
rabbit_virtual_host=<%= @rabbit_virtual_host %>
<%- else -%>
#rabbit_virtual_host=/
<%- end -%>
<%- if @rabbit_ha_queues and @rabbit_ha_queues != "<SERVICE DEFAULT>" -%>
rabbit_ha_queues=<%= @rabbit_ha_queues %>
<%- else -%>