Merge "Deprecate oslo.messaging rpc_backend option parameter"
This commit is contained in:
commit
a893c9876f
@ -18,10 +18,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) Use these options to configure the RabbitMQ message system.
|
|
||||||
# Defaults to 'rabbit'
|
|
||||||
#
|
|
||||||
# [*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
|
||||||
@ -309,6 +305,10 @@
|
|||||||
# not necessarily a host name, FQDN, or IP address.
|
# not necessarily a host name, FQDN, or IP address.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*rpc_backend*]
|
||||||
|
# (Optional) DEPRECATED. Use these options to configure the RabbitMQ message system.
|
||||||
|
# Defaults to 'rabbit'
|
||||||
|
#
|
||||||
class cinder (
|
class cinder (
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
$database_idle_timeout = undef,
|
$database_idle_timeout = undef,
|
||||||
@ -318,7 +318,6 @@ class cinder (
|
|||||||
$database_retry_interval = undef,
|
$database_retry_interval = undef,
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rpc_backend = 'rabbit',
|
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$control_exchange = 'openstack',
|
$control_exchange = 'openstack',
|
||||||
$rabbit_ha_queues = $::os_service_default,
|
$rabbit_ha_queues = $::os_service_default,
|
||||||
@ -379,6 +378,7 @@ class cinder (
|
|||||||
$rabbit_userid = $::os_service_default,
|
$rabbit_userid = $::os_service_default,
|
||||||
$rabbit_virtual_host = $::os_service_default,
|
$rabbit_virtual_host = $::os_service_default,
|
||||||
$host = $::os_service_default,
|
$host = $::os_service_default,
|
||||||
|
$rpc_backend = 'rabbit',
|
||||||
) inherits cinder::params {
|
) inherits cinder::params {
|
||||||
|
|
||||||
include ::cinder::deps
|
include ::cinder::deps
|
||||||
@ -402,10 +402,12 @@ class cinder (
|
|||||||
!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_userid) or
|
!is_service_default($rabbit_userid) or
|
||||||
|
!is_service_default($rpc_backend) or
|
||||||
!is_service_default($rabbit_virtual_host) {
|
!is_service_default($rabbit_virtual_host) {
|
||||||
warning("cinder::rabbit_host, cinder::rabbit_hosts, cinder::rabbit_password, \
|
warning("cinder::rabbit_host, cinder::rabbit_hosts, cinder::rabbit_password, \
|
||||||
cinder::rabbit_port, cinder::rabbit_userid and cinder::rabbit_virtual_host are \
|
cinder::rabbit_port, cinder::rabbit_userid, cinder::rabbit_virtual_host and \
|
||||||
deprecated. Please use cinder::default_transport_url instead.")
|
cinder::rpc_backend are deprecated. Please use cinder::default_transport_url \
|
||||||
|
instead.")
|
||||||
}
|
}
|
||||||
|
|
||||||
package { 'cinder':
|
package { 'cinder':
|
||||||
@ -418,52 +420,43 @@ deprecated. Please use cinder::default_transport_url instead.")
|
|||||||
purge => $purge_config,
|
purge => $purge_config,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $rpc_backend == 'cinder.openstack.common.rpc.impl_kombu' or $rpc_backend == 'rabbit' {
|
oslo::messaging::rabbit { 'cinder_config':
|
||||||
|
rabbit_userid => $rabbit_userid,
|
||||||
if is_service_default($default_transport_url) and is_service_default($rabbit_password) {
|
rabbit_password => $rabbit_password,
|
||||||
fail('Please specify a rabbit_password parameter.')
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
}
|
rabbit_host => $rabbit_host,
|
||||||
|
rabbit_port => $rabbit_port,
|
||||||
oslo::messaging::rabbit { 'cinder_config':
|
rabbit_hosts => $rabbit_hosts,
|
||||||
rabbit_userid => $rabbit_userid,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbit_password => $rabbit_password,
|
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||||
rabbit_host => $rabbit_host,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
rabbit_port => $rabbit_port,
|
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||||
rabbit_hosts => $rabbit_hosts,
|
kombu_ssl_version => $kombu_ssl_version,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
kombu_compression => $kombu_compression,
|
||||||
kombu_ssl_version => $kombu_ssl_version,
|
|
||||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
|
||||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
|
||||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
|
||||||
kombu_compression => $kombu_compression,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elsif $rpc_backend == 'amqp' {
|
|
||||||
|
|
||||||
oslo::messaging::amqp { 'cinder_config':
|
oslo::messaging::amqp { 'cinder_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,
|
||||||
group_request_prefix => $amqp_group_request_prefix,
|
group_request_prefix => $amqp_group_request_prefix,
|
||||||
container_name => $amqp_container_name,
|
container_name => $amqp_container_name,
|
||||||
idle_timeout => $amqp_idle_timeout,
|
idle_timeout => $amqp_idle_timeout,
|
||||||
trace => $amqp_trace,
|
trace => $amqp_trace,
|
||||||
ssl_ca_file => $amqp_ssl_ca_file,
|
ssl_ca_file => $amqp_ssl_ca_file,
|
||||||
ssl_cert_file => $amqp_ssl_cert_file,
|
ssl_cert_file => $amqp_ssl_cert_file,
|
||||||
ssl_key_file => $amqp_ssl_key_file,
|
ssl_key_file => $amqp_ssl_key_file,
|
||||||
ssl_key_password => $amqp_ssl_key_password,
|
ssl_key_password => $amqp_ssl_key_password,
|
||||||
allow_insecure_clients => $amqp_allow_insecure_clients,
|
allow_insecure_clients => $amqp_allow_insecure_clients,
|
||||||
sasl_mechanisms => $amqp_sasl_mechanisms,
|
sasl_mechanisms => $amqp_sasl_mechanisms,
|
||||||
sasl_config_dir => $amqp_sasl_config_dir,
|
sasl_config_dir => $amqp_sasl_config_dir,
|
||||||
sasl_config_name => $amqp_sasl_config_name,
|
sasl_config_name => $amqp_sasl_config_name,
|
||||||
username => $amqp_username,
|
username => $amqp_username,
|
||||||
password => $amqp_password,
|
password => $amqp_password,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::messaging::default { 'cinder_config':
|
oslo::messaging::default { 'cinder_config':
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- cinder::rpc_backend is deprecated and will be removed in a future
|
||||||
|
release. Please use cinder::default_transport_url instead.
|
@ -180,11 +180,7 @@ describe 'cinder' do
|
|||||||
it { is_expected.to contain_cinder_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) }
|
it { is_expected.to contain_cinder_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with amqp rpc_backend defaults' do
|
describe 'with amqp defaults' do
|
||||||
let :params do
|
|
||||||
{ :rpc_backend => 'amqp' }
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures amqp' do
|
it 'configures amqp' do
|
||||||
is_expected.to contain_cinder_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_cinder_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_cinder_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_cinder_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
@ -205,10 +201,9 @@ describe 'cinder' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with amqp rpc_backend overrides' do
|
describe 'with amqp overrides' do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
: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…
x
Reference in New Issue
Block a user