Remove rpc_backend conditional for oslo.messaging driver options
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: I2700421a187d8f815ba42a4160c46659876f854e
This commit is contained in:
parent
58d1c4cc59
commit
37ce8b45e6
|
@ -24,13 +24,6 @@
|
||||||
# option.
|
# option.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*rpc_backend*]
|
|
||||||
# (optional) The rpc backend implementation to use, can be:
|
|
||||||
# amqp (for AMQP 1.0 protocol)
|
|
||||||
# rabbit (for rabbitmq)
|
|
||||||
# zmq (for zeromq)
|
|
||||||
# Defaults to 'rabbit'
|
|
||||||
#
|
|
||||||
# [*rabbit_use_ssl*]
|
# [*rabbit_use_ssl*]
|
||||||
# (optional) Connect over SSL for RabbitMQ
|
# (optional) Connect over SSL for RabbitMQ
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
|
@ -201,12 +194,20 @@
|
||||||
# (optional) Datasources types
|
# (optional) Datasources types
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# === DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*rpc_backend*]
|
||||||
|
# (optional) The rpc backend implementation to use, can be:
|
||||||
|
# amqp (for AMQP 1.0 protocol)
|
||||||
|
# rabbit (for rabbitmq)
|
||||||
|
# zmq (for zeromq)
|
||||||
|
# Defaults to 'rabbit'
|
||||||
|
#
|
||||||
class vitrage (
|
class vitrage (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$default_transport_url = $::os_service_default,
|
$default_transport_url = $::os_service_default,
|
||||||
$rpc_response_timeout = $::os_service_default,
|
$rpc_response_timeout = $::os_service_default,
|
||||||
$control_exchange = $::os_service_default,
|
$control_exchange = $::os_service_default,
|
||||||
$rpc_backend = 'rabbit',
|
|
||||||
$rabbit_use_ssl = $::os_service_default,
|
$rabbit_use_ssl = $::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,
|
||||||
|
@ -245,11 +246,18 @@ class vitrage (
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$snapshots_interval = $::os_service_default,
|
$snapshots_interval = $::os_service_default,
|
||||||
$types = $::os_service_default,
|
$types = $::os_service_default,
|
||||||
|
#DEPRECATED
|
||||||
|
$rpc_backend = 'rabbit',
|
||||||
) inherits vitrage::params {
|
) inherits vitrage::params {
|
||||||
|
|
||||||
include ::vitrage::deps
|
include ::vitrage::deps
|
||||||
include ::vitrage::logging
|
include ::vitrage::logging
|
||||||
|
|
||||||
|
if !is_service_default($rpc_backend) {
|
||||||
|
warning("vitrage::rpc_backend is deprecated. Please use \
|
||||||
|
vitrage::default_transport_url instead.")
|
||||||
|
}
|
||||||
|
|
||||||
package { 'vitrage':
|
package { 'vitrage':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::vitrage::params::common_package_name,
|
name => $::vitrage::params::common_package_name,
|
||||||
|
@ -260,40 +268,37 @@ class vitrage (
|
||||||
purge => $purge_config,
|
purge => $purge_config,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $rpc_backend == 'rabbit' {
|
oslo::messaging::rabbit { 'vitrage_config':
|
||||||
oslo::messaging::rabbit { 'vitrage_config':
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
kombu_ssl_version => $kombu_ssl_version,
|
||||||
kombu_ssl_version => $kombu_ssl_version,
|
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
kombu_compression => $kombu_compression,
|
||||||
kombu_compression => $kombu_compression,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elsif $rpc_backend == 'amqp' {
|
|
||||||
oslo::messaging::amqp { 'vitrage_config':
|
oslo::messaging::amqp { 'vitrage_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 { 'vitrage_config':
|
oslo::messaging::default { 'vitrage_config':
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- vitrage::rpc_backend is deprecated and will be removed in a future
|
||||||
|
release. Please use vitrage::default_transport_url instead.
|
|
@ -175,37 +175,30 @@ describe 'vitrage' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with amqp rpc_backend' do
|
context 'with default amqp parameters' do
|
||||||
let :params do
|
it 'configures amqp' do
|
||||||
{ :rpc_backend => 'amqp' }
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
||||||
context 'with default parameters' do
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
||||||
it 'configures amqp' do
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/server_request_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/broadcast_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/group_request_prefix').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/container_name').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/idle_timeout').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/trace').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_vitrage_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_vitrage_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with overriden amqp parameters' do
|
context 'with overriden amqp parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :rpc_backend => 'amqp',
|
{ :default_transport_url => 'amqp://amqp_user:password@localhost:5672',
|
||||||
:default_transport_url => 'amqp://amqp_user:password@localhost:5672',
|
|
||||||
:rpc_response_timeout => '240',
|
:rpc_response_timeout => '240',
|
||||||
:control_exchange => 'openstack',
|
:control_exchange => 'openstack',
|
||||||
:amqp_idle_timeout => '60',
|
:amqp_idle_timeout => '60',
|
||||||
|
|
Loading…
Reference in New Issue