Deprecate oslo.messaging rpc_backend option parameter
Oslo.messaging uses the transport_url to represent the rpc and notification messaging driver to use and its full configuration. The rpc_backend configuration option is deprecated for removal and should not gate oslo.messaging driver configuration options. This patch: * deprecate rpc_backend * remove conditional check * update spec tests * add release note Change-Id: I071912e15a2e98f523b0888f9f4f20b9ed94e4d9
This commit is contained in:
parent
63a0004592
commit
4b5ff430a6
@ -116,10 +116,6 @@
|
|||||||
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rpc_backend*]
|
|
||||||
# (optional) what rpc/queuing service to use
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*rpc_response_timeout*]
|
# [*rpc_response_timeout*]
|
||||||
# (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
|
||||||
@ -352,6 +348,10 @@
|
|||||||
# multiple RabbitMQ Brokers.
|
# multiple RabbitMQ Brokers.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*rpc_backend*]
|
||||||
|
# (optional) what rpc/queuing service to use
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class neutron (
|
class neutron (
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
@ -376,7 +376,6 @@ class neutron (
|
|||||||
$report_interval = $::os_service_default,
|
$report_interval = $::os_service_default,
|
||||||
$control_exchange = 'neutron',
|
$control_exchange = 'neutron',
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rpc_backend = $::os_service_default,
|
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||||
@ -430,6 +429,7 @@ class neutron (
|
|||||||
$rabbit_port = $::os_service_default,
|
$rabbit_port = $::os_service_default,
|
||||||
$rabbit_user = $::os_service_default,
|
$rabbit_user = $::os_service_default,
|
||||||
$rabbit_virtual_host = $::os_service_default,
|
$rabbit_virtual_host = $::os_service_default,
|
||||||
|
$rpc_backend = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
@ -467,10 +467,12 @@ class neutron (
|
|||||||
!is_service_default($rabbit_password) or
|
!is_service_default($rabbit_password) or
|
||||||
!is_service_default($rabbit_port) or
|
!is_service_default($rabbit_port) or
|
||||||
!is_service_default($rabbit_user) or
|
!is_service_default($rabbit_user) or
|
||||||
!is_service_default($rabbit_virtual_host) {
|
!is_service_default($rabbit_virtual_host) or
|
||||||
|
!is_service_default($rpc_backend) {
|
||||||
warning("neutron::rabbit_host, neutron::rabbit_hosts, neutron::rabbit_password, \
|
warning("neutron::rabbit_host, neutron::rabbit_hosts, neutron::rabbit_password, \
|
||||||
neutron::rabbit_port, neutron::rabbit_user and neutron::rabbit_virtual_host are \
|
neutron::rabbit_port, neutron::rabbit_user, neutron::rabbit_virtual_host and \
|
||||||
deprecated. Please use neutron::default_transport_url instead.")
|
neutron::rpc_backend are deprecated. Please use neutron::default_transport_url \
|
||||||
|
instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'neutron':
|
package { 'neutron':
|
||||||
@ -526,11 +528,6 @@ deprecated. Please use neutron::default_transport_url instead.")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $rpc_backend in [$::os_service_default, 'rabbit'] {
|
|
||||||
if is_service_default($default_transport_url) and is_service_default($rabbit_password) {
|
|
||||||
fail('When rpc_backend is rabbitmq, you must set rabbit password')
|
|
||||||
}
|
|
||||||
|
|
||||||
oslo::messaging::rabbit {'neutron_config':
|
oslo::messaging::rabbit {'neutron_config':
|
||||||
rabbit_userid => $rabbit_user,
|
rabbit_userid => $rabbit_user,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
@ -553,7 +550,7 @@ deprecated. Please use neutron::default_transport_url instead.")
|
|||||||
rabbit_port => $rabbit_port,
|
rabbit_port => $rabbit_port,
|
||||||
kombu_ssl_version => $kombu_ssl_version,
|
kombu_ssl_version => $kombu_ssl_version,
|
||||||
}
|
}
|
||||||
} elsif $rpc_backend == 'amqp' {
|
|
||||||
oslo::messaging::amqp { 'neutron_config':
|
oslo::messaging::amqp { 'neutron_config':
|
||||||
server_request_prefix => $amqp_server_request_prefix,
|
server_request_prefix => $amqp_server_request_prefix,
|
||||||
broadcast_prefix => $amqp_broadcast_prefix,
|
broadcast_prefix => $amqp_broadcast_prefix,
|
||||||
@ -572,11 +569,6 @@ deprecated. Please use neutron::default_transport_url instead.")
|
|||||||
username => $amqp_username,
|
username => $amqp_username,
|
||||||
password => $amqp_password,
|
password => $amqp_password,
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
neutron_config {
|
|
||||||
'DEFAULT/rpc_backend': value => $rpc_backend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# SSL Options
|
# SSL Options
|
||||||
neutron_config {
|
neutron_config {
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- neutron::rpc_backend is deprecated and will be removed in a future
|
||||||
|
release. Please use neutron::default_transport_url instead.
|
@ -92,7 +92,7 @@ describe 'neutron' do
|
|||||||
it_configures 'with transport_url defined'
|
it_configures 'with transport_url defined'
|
||||||
it_configures 'with rootwrap daemon'
|
it_configures 'with rootwrap daemon'
|
||||||
|
|
||||||
context 'with amqp rpc_backend value' do
|
context 'with amqp messaging' do
|
||||||
it_configures 'amqp support'
|
it_configures 'amqp support'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -472,9 +472,7 @@ describe 'neutron' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'amqp support' do
|
shared_examples_for 'amqp support' do
|
||||||
context 'with default parameters' do
|
context 'with default amqp parameters' do
|
||||||
before { params.merge!( :rpc_backend => 'amqp' ) }
|
|
||||||
|
|
||||||
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_neutron_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>') }
|
||||||
@ -495,7 +493,6 @@ describe 'neutron' do
|
|||||||
|
|
||||||
context 'with overriden amqp parameters' do
|
context 'with overriden amqp parameters' do
|
||||||
before { params.merge!(
|
before { params.merge!(
|
||||||
:rpc_backend => 'amqp',
|
|
||||||
:amqp_idle_timeout => '60',
|
:amqp_idle_timeout => '60',
|
||||||
:amqp_trace => true,
|
:amqp_trace => true,
|
||||||
:amqp_ssl_ca_file => '/path/to/ca.cert',
|
:amqp_ssl_ca_file => '/path/to/ca.cert',
|
||||||
|
Loading…
Reference in New Issue
Block a user