Merge "Add kombu_failover_strategy and kombu_compression options"
This commit is contained in:
commit
364bf18953
@ -233,7 +233,20 @@
|
|||||||
#
|
#
|
||||||
# [*kombu_reconnect_delay*]
|
# [*kombu_reconnect_delay*]
|
||||||
# (Optional) Backoff on cancel notification (valid only if SSL enabled).
|
# (Optional) Backoff on cancel notification (valid only if SSL enabled).
|
||||||
# Defaults to '1.0'; floating-point value.
|
# (floating-point value)
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*kombu_failover_strategy*]
|
||||||
|
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
|
||||||
|
# we are currently connected to becomes unavailable. Takes effect only if
|
||||||
|
# more than one RabbitMQ node is provided in config. (string value)
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
|
# [*kombu_compression*]
|
||||||
|
# (optional) Possible values are: gzip, bz2. If not set compression will not
|
||||||
|
# be used. This option may notbe available in future versions. EXPERIMENTAL.
|
||||||
|
# (string value)
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# == DEPRECATED PARAMETERS
|
# == DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
@ -296,6 +309,8 @@ class sahara(
|
|||||||
$kombu_ssl_certfile = $::os_service_default,
|
$kombu_ssl_certfile = $::os_service_default,
|
||||||
$kombu_ssl_ca_certs = $::os_service_default,
|
$kombu_ssl_ca_certs = $::os_service_default,
|
||||||
$kombu_reconnect_delay = $::os_service_default,
|
$kombu_reconnect_delay = $::os_service_default,
|
||||||
|
$kombu_failover_strategy = $::os_service_default,
|
||||||
|
$kombu_compression = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$zeromq_port = undef,
|
$zeromq_port = undef,
|
||||||
) {
|
) {
|
||||||
@ -334,24 +349,26 @@ class sahara(
|
|||||||
|
|
||||||
if $rpc_backend == 'rabbit' or is_service_default($rpc_backend) {
|
if $rpc_backend == 'rabbit' or is_service_default($rpc_backend) {
|
||||||
oslo::messaging::rabbit { 'sahara_config':
|
oslo::messaging::rabbit { 'sahara_config':
|
||||||
rabbit_userid => $rabbit_userid,
|
rabbit_userid => $rabbit_userid,
|
||||||
rabbit_password => $rabbit_password,
|
rabbit_password => $rabbit_password,
|
||||||
rabbit_virtual_host => $rabbit_virtual_host,
|
rabbit_virtual_host => $rabbit_virtual_host,
|
||||||
rabbit_host => $rabbit_host,
|
rabbit_host => $rabbit_host,
|
||||||
rabbit_port => $rabbit_port,
|
rabbit_port => $rabbit_port,
|
||||||
rabbit_hosts => $rabbit_hosts,
|
rabbit_hosts => $rabbit_hosts,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
kombu_failover_strategy => $kombu_failover_strategy,
|
||||||
kombu_ssl_version => $kombu_ssl_version,
|
kombu_compression => $kombu_compression,
|
||||||
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||||
kombu_ssl_certfile => $kombu_ssl_certfile,
|
kombu_ssl_version => $kombu_ssl_version,
|
||||||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
kombu_ssl_keyfile => $kombu_ssl_keyfile,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
kombu_ssl_certfile => $kombu_ssl_certfile,
|
||||||
rabbit_login_method => $rabbit_login_method,
|
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||||
rabbit_retry_interval => $rabbit_retry_interval,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
rabbit_retry_backoff => $rabbit_retry_backoff,
|
rabbit_login_method => $rabbit_login_method,
|
||||||
rabbit_max_retries => $rabbit_max_retries,
|
rabbit_retry_interval => $rabbit_retry_interval,
|
||||||
|
rabbit_retry_backoff => $rabbit_retry_backoff,
|
||||||
|
rabbit_max_retries => $rabbit_max_retries,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@ describe 'sahara' do
|
|||||||
it { is_expected.to contain_sahara_config('keystone_authtoken/admin_tenant_name').with_value('services') }
|
it { is_expected.to contain_sahara_config('keystone_authtoken/admin_tenant_name').with_value('services') }
|
||||||
it { is_expected.to contain_sahara_config('keystone_authtoken/admin_password').with_value('secrete').with_secret(true) }
|
it { is_expected.to contain_sahara_config('keystone_authtoken/admin_password').with_value('secrete').with_secret(true) }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/plugins').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_sahara_config('DEFAULT/plugins').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_compression').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('<SERVICE DEFAULT>') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with passing params' do
|
context 'with passing params' do
|
||||||
@ -82,12 +85,15 @@ describe 'sahara' do
|
|||||||
context 'when passing params' do
|
context 'when passing params' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:rabbit_password => 'pass',
|
:rabbit_password => 'pass',
|
||||||
:rabbit_userid => 'guest2',
|
:rabbit_userid => 'guest2',
|
||||||
:rabbit_host => 'localhost2',
|
:rabbit_host => 'localhost2',
|
||||||
:rabbit_port => '5673',
|
:rabbit_port => '5673',
|
||||||
:rabbit_ha_queues => 'true',
|
:rabbit_ha_queues => 'true',
|
||||||
:amqp_durable_queues => 'true',
|
:amqp_durable_queues => 'true',
|
||||||
|
:kombu_reconnect_delay => '1.0',
|
||||||
|
:kombu_compression => 'gzip',
|
||||||
|
:kombu_failover_strategy => 'round-robin',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -98,6 +104,9 @@ describe 'sahara' do
|
|||||||
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') }
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') }
|
||||||
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') }
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('true') }
|
||||||
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('1.0') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_compression').with_value('gzip') }
|
||||||
|
it { is_expected.to contain_sahara_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('round-robin') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with rabbit ssl cert parameters' do
|
context 'with rabbit ssl cert parameters' do
|
||||||
|
Loading…
Reference in New Issue
Block a user