Deprecate rabbitmq connection parameters
The rabbitmq connection parameters have been deprecated in favor of the transport_url setting. Change-Id: If4dfe8b82518fc4e590731a805ee3115b11f4f47 Related-Bug: #1625198
This commit is contained in:
parent
f27b001128
commit
fef877e61d
@ -158,7 +158,10 @@ class neutron::agents::ml2::linuxbridge (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $::neutron::rpc_backend == 'neutron.openstack.common.rpc.impl_kombu' {
|
if $::neutron::rpc_backend == 'neutron.openstack.common.rpc.impl_kombu' {
|
||||||
$linuxbridge_agent_subscribe = Neutron_config['oslo_messaging_rabbit/rabbit_hosts']
|
$linuxbridge_agent_subscribe = [
|
||||||
|
Neutron_config['oslo_messaging_rabbit/rabbit_hosts'],
|
||||||
|
Neutron_config['DEFAULT/transport_url']
|
||||||
|
]
|
||||||
} else {
|
} else {
|
||||||
$linuxbridge_agent_subscribe = undef
|
$linuxbridge_agent_subscribe = undef
|
||||||
}
|
}
|
||||||
|
@ -128,23 +128,6 @@
|
|||||||
# (optional) Seconds to wait for a response from a call
|
# (optional) Seconds to wait for a response from a call
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rabbit_password*]
|
|
||||||
# [*rabbit_host*]
|
|
||||||
# [*rabbit_port*]
|
|
||||||
# [*rabbit_user*]
|
|
||||||
# (optional) Various rabbitmq settings
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_virtual_host*]
|
|
||||||
# (optional) virtualhost to use.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_hosts*]
|
|
||||||
# (optional) array of rabbitmq servers for HA.
|
|
||||||
# A single IP address, such as a VIP, can be used for load-balancing
|
|
||||||
# multiple RabbitMQ Brokers.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rabbit_ha_queues*]
|
# [*rabbit_ha_queues*]
|
||||||
# (Optional) Use HA queues in RabbitMQ.
|
# (Optional) Use HA queues in RabbitMQ.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@ -375,6 +358,23 @@
|
|||||||
# [*memcache_servers*]
|
# [*memcache_servers*]
|
||||||
# (optional) This option is deprecated an has no effect.
|
# (optional) This option is deprecated an has no effect.
|
||||||
#
|
#
|
||||||
|
# [*rabbit_password*]
|
||||||
|
# [*rabbit_host*]
|
||||||
|
# [*rabbit_port*]
|
||||||
|
# [*rabbit_user*]
|
||||||
|
# (optional) Various rabbitmq settings
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_virtual_host*]
|
||||||
|
# (optional) virtualhost to use.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*rabbit_hosts*]
|
||||||
|
# (optional) array of rabbitmq servers for HA.
|
||||||
|
# A single IP address, such as a VIP, can be used for load-balancing
|
||||||
|
# multiple RabbitMQ Brokers.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class neutron (
|
class neutron (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
@ -402,13 +402,7 @@ class neutron (
|
|||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rpc_backend = $::os_service_default,
|
$rpc_backend = $::os_service_default,
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$rabbit_password = $::os_service_default,
|
|
||||||
$rabbit_host = $::os_service_default,
|
|
||||||
$rabbit_hosts = $::os_service_default,
|
|
||||||
$rabbit_port = $::os_service_default,
|
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
$rabbit_user = $::os_service_default,
|
|
||||||
$rabbit_virtual_host = $::os_service_default,
|
|
||||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||||
$rabbit_heartbeat_rate = $::os_service_default,
|
$rabbit_heartbeat_rate = $::os_service_default,
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $::os_service_default,
|
||||||
@ -459,6 +453,12 @@ class neutron (
|
|||||||
$allow_pagination = undef,
|
$allow_pagination = undef,
|
||||||
$allow_sorting = undef,
|
$allow_sorting = undef,
|
||||||
$memcache_servers = undef,
|
$memcache_servers = undef,
|
||||||
|
$rabbit_password = $::os_service_default,
|
||||||
|
$rabbit_host = $::os_service_default,
|
||||||
|
$rabbit_hosts = $::os_service_default,
|
||||||
|
$rabbit_port = $::os_service_default,
|
||||||
|
$rabbit_user = $::os_service_default,
|
||||||
|
$rabbit_virtual_host = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
@ -511,6 +511,17 @@ class neutron (
|
|||||||
warning('memcache_servers option is deprecated, has no effect and will be removed after Ocata.')
|
warning('memcache_servers option is deprecated, has no effect and will be removed after Ocata.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_user) or
|
||||||
|
!is_service_default($rabbit_virtual_host) {
|
||||||
|
warning("neutron::rabbit_host, neutron::rabbit_hosts, neutron::rabbit_password, \
|
||||||
|
neutron::rabbit_port, neutron::rabbit_user and neutron::rabbit_virtual_host are \
|
||||||
|
deprecated. Please use neutron::default_transport_url instead.")
|
||||||
|
}
|
||||||
|
|
||||||
package { 'neutron':
|
package { 'neutron':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::neutron::params::package_name,
|
name => $::neutron::params::package_name,
|
||||||
@ -546,7 +557,7 @@ class neutron (
|
|||||||
oslo::messaging::default { 'neutron_config':
|
oslo::messaging::default { 'neutron_config':
|
||||||
transport_url => $default_transport_url,
|
transport_url => $default_transport_url,
|
||||||
rpc_response_timeout => $rpc_response_timeout,
|
rpc_response_timeout => $rpc_response_timeout,
|
||||||
control_exchange => $control_exchange
|
control_exchange => $control_exchange,
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::concurrency { 'neutron_config': lock_path => $lock_path }
|
oslo::concurrency { 'neutron_config': lock_path => $lock_path }
|
||||||
@ -566,7 +577,7 @@ class neutron (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $rpc_backend in [$::os_service_default, 'neutron.openstack.common.rpc.impl_kombu', 'rabbit'] {
|
if $rpc_backend in [$::os_service_default, 'neutron.openstack.common.rpc.impl_kombu', 'rabbit'] {
|
||||||
if is_service_default($rabbit_password) {
|
if is_service_default($default_transport_url) and is_service_default($rabbit_password) {
|
||||||
fail('When rpc_backend is rabbitmq, you must set rabbit password')
|
fail('When rpc_backend is rabbitmq, you must set rabbit password')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- neutron::rabbit_host, neutron::rabbit_hosts, neutron::rabbit_password,
|
||||||
|
neutron::rabbit_port, neutron::rabbit_user and
|
||||||
|
neutron::rabbit_virtual_host are deprecated.
|
||||||
|
neutron::default_transport_url should be used instead.
|
@ -30,9 +30,7 @@ describe 'basic neutron' do
|
|||||||
|
|
||||||
# Neutron resources
|
# Neutron resources
|
||||||
class { '::neutron':
|
class { '::neutron':
|
||||||
rabbit_user => 'neutron',
|
default_transport_url => 'rabbit://neutron:an_even_bigger_secret@127.0.0.1:5672/',
|
||||||
rabbit_password => 'an_even_bigger_secret',
|
|
||||||
rabbit_host => '127.0.0.1',
|
|
||||||
allow_overlapping_ips => true,
|
allow_overlapping_ips => true,
|
||||||
core_plugin => 'ml2',
|
core_plugin => 'ml2',
|
||||||
debug => true,
|
debug => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user