From 08f3eca1ee21e1c9f242503ca34f9fc53fb5ecf4 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 21 Oct 2018 18:03:30 +0200 Subject: [PATCH] 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 --- manifests/guestagent.pp | 74 +++++-------------- ...it-params-guestagent-4f0178bdfac9ffd9.yaml | 9 +++ templates/trove-guestagent.conf.erb | 52 +------------ 3 files changed, 28 insertions(+), 107 deletions(-) create mode 100644 releasenotes/notes/remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml diff --git a/manifests/guestagent.pp b/manifests/guestagent.pp index 3461b57a..8b1d1cd0 100644 --- a/manifests/guestagent.pp +++ b/manifests/guestagent.pp @@ -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, diff --git a/releasenotes/notes/remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml b/releasenotes/notes/remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml new file mode 100644 index 00000000..2b836214 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-rabbit-params-guestagent-4f0178bdfac9ffd9.yaml @@ -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. diff --git a/templates/trove-guestagent.conf.erb b/templates/trove-guestagent.conf.erb index 9230fe3d..c30ff911 100644 --- a/templates/trove-guestagent.conf.erb +++ b/templates/trove-guestagent.conf.erb @@ -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= +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 != "" -%> -# 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 != "" -%> -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 != "" -%> -rabbit_port=<%= @rabbit_port %> -<%- else -%> -#rabbit_port=5672 -<%- end -%> -<%- end -%> - -# The RabbitMQ userid. (string value) -<%- if @rabbit_userid and @rabbit_userid != "" -%> -rabbit_userid=<%= @rabbit_userid %> -<%- else -%> -#rabbit_userid=guest -<%- end -%> - -# The RabbitMQ password. (string value) -<%- if @rabbit_password and @rabbit_password != "" -%> -rabbit_password=<%= @rabbit_password %> -<%- else -%> -#rabbit_password=guest -<%- end -%> - -# The RabbitMQ virtual host. (string value) -<%- if @rabbit_virtual_host and @rabbit_virtual_host != "" -%> -rabbit_virtual_host=<%= @rabbit_virtual_host %> -<%- else -%> -#rabbit_virtual_host=/ -<%- end -%> - <%- if @rabbit_ha_queues and @rabbit_ha_queues != "" -%> rabbit_ha_queues=<%= @rabbit_ha_queues %> <%- else -%>