Merge "RabbitMQ: Add support for quorum queue options"
This commit is contained in:
commit
fb810ed2d1
|
@ -68,6 +68,24 @@
|
||||||
# will be run through a green thread.
|
# will be run through a green thread.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*rabbit_quorum_queue*]
|
||||||
|
# (Optional) Use quorum queues in RabbitMQ.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*rabbit_quorum_delivery_limit*]
|
||||||
|
# (Optional) Each time a message is rdelivered to a consumer, a counter is
|
||||||
|
# incremented. Once the redelivery count exceeds the delivery limit
|
||||||
|
# the message gets dropped or dead-lettered.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*rabbit_quorum_max_memory_length*]
|
||||||
|
# (Optional) Limit the number of messages in the quorum queue.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
|
# [*rabbit_quorum_max_memory_bytes*]
|
||||||
|
# (Optional) Limit the number of memory bytes used by the quorum queue.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
# [*kombu_ssl_ca_certs*]
|
# [*kombu_ssl_ca_certs*]
|
||||||
# (optional) SSL certification authority file (valid only if SSL enabled).
|
# (optional) SSL certification authority file (valid only if SSL enabled).
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
|
@ -123,31 +141,35 @@
|
||||||
# Defaults to $facts['os_service_default'].
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
class designate(
|
class designate(
|
||||||
$package_ensure = present,
|
$package_ensure = present,
|
||||||
$common_package_name = $::designate::params::common_package_name,
|
$common_package_name = $::designate::params::common_package_name,
|
||||||
$host = $facts['os_service_default'],
|
$host = $facts['os_service_default'],
|
||||||
$root_helper = 'sudo designate-rootwrap /etc/designate/rootwrap.conf',
|
$root_helper = 'sudo designate-rootwrap /etc/designate/rootwrap.conf',
|
||||||
$state_path = $::designate::params::state_path,
|
$state_path = $::designate::params::state_path,
|
||||||
$notification_transport_url = $facts['os_service_default'],
|
$notification_transport_url = $facts['os_service_default'],
|
||||||
$rabbit_use_ssl = $facts['os_service_default'],
|
$rabbit_use_ssl = $facts['os_service_default'],
|
||||||
$rabbit_ha_queues = $facts['os_service_default'],
|
$rabbit_ha_queues = $facts['os_service_default'],
|
||||||
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
|
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
|
||||||
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
$rabbit_quorum_queue = $facts['os_service_default'],
|
||||||
$kombu_ssl_certfile = $facts['os_service_default'],
|
$rabbit_quorum_delivery_limit = $facts['os_service_default'],
|
||||||
$kombu_ssl_keyfile = $facts['os_service_default'],
|
$rabbit_quorum_max_memory_length = $facts['os_service_default'],
|
||||||
$kombu_ssl_version = $facts['os_service_default'],
|
$rabbit_quorum_max_memory_bytes = $facts['os_service_default'],
|
||||||
$kombu_reconnect_delay = $facts['os_service_default'],
|
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
||||||
$kombu_failover_strategy = $facts['os_service_default'],
|
$kombu_ssl_certfile = $facts['os_service_default'],
|
||||||
$notification_driver = 'messaging',
|
$kombu_ssl_keyfile = $facts['os_service_default'],
|
||||||
$default_transport_url = $facts['os_service_default'],
|
$kombu_ssl_version = $facts['os_service_default'],
|
||||||
$rpc_response_timeout = $facts['os_service_default'],
|
$kombu_reconnect_delay = $facts['os_service_default'],
|
||||||
$control_exchange = $facts['os_service_default'],
|
$kombu_failover_strategy = $facts['os_service_default'],
|
||||||
$executor_thread_pool_size = $facts['os_service_default'],
|
$notification_driver = 'messaging',
|
||||||
$notification_topics = $facts['os_service_default'],
|
$default_transport_url = $facts['os_service_default'],
|
||||||
Boolean $purge_config = false,
|
$rpc_response_timeout = $facts['os_service_default'],
|
||||||
$amqp_durable_queues = $facts['os_service_default'],
|
$control_exchange = $facts['os_service_default'],
|
||||||
$default_ttl = $facts['os_service_default'],
|
$executor_thread_pool_size = $facts['os_service_default'],
|
||||||
$supported_record_type = $facts['os_service_default'],
|
$notification_topics = $facts['os_service_default'],
|
||||||
|
Boolean $purge_config = false,
|
||||||
|
$amqp_durable_queues = $facts['os_service_default'],
|
||||||
|
$default_ttl = $facts['os_service_default'],
|
||||||
|
$supported_record_type = $facts['os_service_default'],
|
||||||
) inherits designate::params {
|
) inherits designate::params {
|
||||||
|
|
||||||
include designate::deps
|
include designate::deps
|
||||||
|
@ -163,16 +185,20 @@ class designate(
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::messaging::rabbit { 'designate_config':
|
oslo::messaging::rabbit { 'designate_config':
|
||||||
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_reconnect_delay => $kombu_reconnect_delay,
|
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||||
kombu_failover_strategy => $kombu_failover_strategy,
|
kombu_failover_strategy => $kombu_failover_strategy,
|
||||||
rabbit_use_ssl => $rabbit_use_ssl,
|
rabbit_use_ssl => $rabbit_use_ssl,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
heartbeat_in_pthread => $rabbit_heartbeat_in_pthread,
|
heartbeat_in_pthread => $rabbit_heartbeat_in_pthread,
|
||||||
amqp_durable_queues => $amqp_durable_queues,
|
amqp_durable_queues => $amqp_durable_queues,
|
||||||
|
rabbit_quorum_queue => $rabbit_quorum_queue,
|
||||||
|
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
|
||||||
|
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
|
||||||
|
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::messaging::default { 'designate_config':
|
oslo::messaging::default { 'designate_config':
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``designate`` class now supports options for quorum queues in RabbitMQ.
|
|
@ -107,16 +107,20 @@ describe 'designate' do
|
||||||
:topics => '<SERVICE DEFAULT>'
|
:topics => '<SERVICE DEFAULT>'
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
||||||
:kombu_ssl_version => '<SERVICE DEFAULT>',
|
:kombu_ssl_version => '<SERVICE DEFAULT>',
|
||||||
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
|
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
|
||||||
:kombu_ssl_certfile => '<SERVICE DEFAULT>',
|
:kombu_ssl_certfile => '<SERVICE DEFAULT>',
|
||||||
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
|
:kombu_ssl_ca_certs => '<SERVICE DEFAULT>',
|
||||||
:kombu_reconnect_delay => '<SERVICE DEFAULT>',
|
:kombu_reconnect_delay => '<SERVICE DEFAULT>',
|
||||||
:kombu_failover_strategy => '<SERVICE DEFAULT>',
|
:kombu_failover_strategy => '<SERVICE DEFAULT>',
|
||||||
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
:rabbit_use_ssl => '<SERVICE DEFAULT>',
|
||||||
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
||||||
:heartbeat_in_pthread => '<SERVICE DEFAULT>',
|
:heartbeat_in_pthread => '<SERVICE DEFAULT>',
|
||||||
:amqp_durable_queues => '<SERVICE DEFAULT>',
|
:amqp_durable_queues => '<SERVICE DEFAULT>',
|
||||||
|
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
|
||||||
|
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
|
||||||
|
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
|
||||||
|
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -125,11 +129,15 @@ describe 'designate' do
|
||||||
shared_examples_for 'rabbit transport' do
|
shared_examples_for 'rabbit transport' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
:default_transport_url => 'rabbit://designate:secret@127.0.0.1:5672/designate',
|
:default_transport_url => 'rabbit://designate:secret@127.0.0.1:5672/designate',
|
||||||
:rabbit_ha_queues => true,
|
:rabbit_ha_queues => true,
|
||||||
:rabbit_heartbeat_in_pthread => true,
|
:rabbit_heartbeat_in_pthread => true,
|
||||||
:kombu_reconnect_delay => '1.0',
|
:rabbit_quorum_queue => true,
|
||||||
:kombu_failover_strategy => 'shuffle',
|
:rabbit_quorum_delivery_limit => 3,
|
||||||
|
:rabbit_quorum_max_memory_length => 5,
|
||||||
|
:rabbit_quorum_max_memory_bytes => 1073741824,
|
||||||
|
:kombu_reconnect_delay => '1.0',
|
||||||
|
:kombu_failover_strategy => 'shuffle',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -137,10 +145,14 @@ describe 'designate' do
|
||||||
:transport_url => 'rabbit://designate:secret@127.0.0.1:5672/designate',
|
:transport_url => 'rabbit://designate:secret@127.0.0.1:5672/designate',
|
||||||
) }
|
) }
|
||||||
it { is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
it { is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
||||||
:rabbit_ha_queues => true,
|
:rabbit_ha_queues => true,
|
||||||
:heartbeat_in_pthread => true,
|
:heartbeat_in_pthread => true,
|
||||||
:kombu_reconnect_delay => '1.0',
|
:rabbit_quorum_queue => true,
|
||||||
:kombu_failover_strategy => 'shuffle'
|
:rabbit_quorum_delivery_limit => 3,
|
||||||
|
:rabbit_quorum_max_memory_length => 5,
|
||||||
|
:rabbit_quorum_max_memory_bytes => 1073741824,
|
||||||
|
:kombu_reconnect_delay => '1.0',
|
||||||
|
:kombu_failover_strategy => 'shuffle'
|
||||||
) }
|
) }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue