diff --git a/manifests/init.pp b/manifests/init.pp index ac5d19fea..0c974638d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -67,6 +67,24 @@ # will be run through a green thread. # 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'] +# # [*rabbit_retry_interval*] # (Optional) How frequently to retry connecting with RabbitMQ. # (integer value) @@ -387,6 +405,10 @@ class nova( $rabbit_heartbeat_rate = $facts['os_service_default'], $rabbit_heartbeat_in_pthread = $facts['os_service_default'], $rabbit_ha_queues = $facts['os_service_default'], + $rabbit_quorum_queue = $facts['os_service_default'], + $rabbit_quorum_delivery_limit = $facts['os_service_default'], + $rabbit_quorum_max_memory_length = $facts['os_service_default'], + $rabbit_quorum_max_memory_bytes = $facts['os_service_default'], $rabbit_retry_interval = $facts['os_service_default'], $kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'], @@ -583,20 +605,24 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa, ssh-ed25519.") } oslo::messaging::rabbit {'nova_config': - rabbit_use_ssl => $rabbit_use_ssl, - heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, - heartbeat_rate => $rabbit_heartbeat_rate, - heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, - kombu_reconnect_delay => $kombu_reconnect_delay, - kombu_failover_strategy => $kombu_failover_strategy, - amqp_durable_queues => $amqp_durable_queues, - kombu_compression => $kombu_compression, - kombu_ssl_ca_certs => $kombu_ssl_ca_certs, - kombu_ssl_certfile => $kombu_ssl_certfile, - kombu_ssl_keyfile => $kombu_ssl_keyfile, - kombu_ssl_version => $kombu_ssl_version, - rabbit_ha_queues => $rabbit_ha_queues, - rabbit_retry_interval => $rabbit_retry_interval, + rabbit_use_ssl => $rabbit_use_ssl, + heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, + heartbeat_rate => $rabbit_heartbeat_rate, + heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, + kombu_reconnect_delay => $kombu_reconnect_delay, + kombu_failover_strategy => $kombu_failover_strategy, + amqp_durable_queues => $amqp_durable_queues, + kombu_compression => $kombu_compression, + kombu_ssl_ca_certs => $kombu_ssl_ca_certs, + kombu_ssl_certfile => $kombu_ssl_certfile, + kombu_ssl_keyfile => $kombu_ssl_keyfile, + kombu_ssl_version => $kombu_ssl_version, + rabbit_ha_queues => $rabbit_ha_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, + rabbit_retry_interval => $rabbit_retry_interval, } oslo::messaging::amqp { 'nova_config': diff --git a/releasenotes/notes/rabbit-quorum-queue-d2d9757075da6767.yaml b/releasenotes/notes/rabbit-quorum-queue-d2d9757075da6767.yaml new file mode 100644 index 000000000..bdce697ae --- /dev/null +++ b/releasenotes/notes/rabbit-quorum-queue-d2d9757075da6767.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The ``nova`` class now supports options for quorum queues in RabbitMQ. diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 8908117da..3065c77be 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -37,20 +37,24 @@ describe 'nova' do :control_exchange => '', ) is_expected.to contain_oslo__messaging__rabbit('nova_config').with( - :rabbit_use_ssl => '', - :heartbeat_timeout_threshold => '', - :heartbeat_rate => '', - :heartbeat_in_pthread => '', - :kombu_reconnect_delay => '', - :kombu_failover_strategy => '', - :amqp_durable_queues => '', - :kombu_compression => '', - :kombu_ssl_ca_certs => '', - :kombu_ssl_certfile => '', - :kombu_ssl_keyfile => '', - :kombu_ssl_version => '', - :rabbit_ha_queues => '', - :rabbit_retry_interval => '', + :rabbit_use_ssl => '', + :heartbeat_timeout_threshold => '', + :heartbeat_rate => '', + :heartbeat_in_pthread => '', + :kombu_reconnect_delay => '', + :kombu_failover_strategy => '', + :amqp_durable_queues => '', + :kombu_compression => '', + :kombu_ssl_ca_certs => '', + :kombu_ssl_certfile => '', + :kombu_ssl_keyfile => '', + :kombu_ssl_version => '', + :rabbit_ha_queues => '', + :rabbit_quorum_queue => '', + :rabbit_quorum_delivery_limit => '', + :rabbit_quorum_max_memory_length => '', + :rabbit_quorum_max_memory_bytes => '', + :rabbit_retry_interval => '', ) is_expected.to contain_oslo__messaging__amqp('nova_config').with( :server_request_prefix => '', @@ -126,6 +130,10 @@ describe 'nova' do :kombu_ssl_keyfile => '/etc/key', :kombu_ssl_version => 'TLSv1', :rabbit_ha_queues => true, + :rabbit_quorum_queue => true, + :rabbit_quorum_delivery_limit => 3, + :rabbit_quorum_max_memory_length => 5, + :rabbit_quorum_max_memory_bytes => 1073741824, :rabbit_retry_interval => '1', :amqp_idle_timeout => '60', :amqp_trace => true, @@ -189,19 +197,23 @@ describe 'nova' do :control_exchange => 'nova', ) is_expected.to contain_oslo__messaging__rabbit('nova_config').with( - :rabbit_use_ssl => true, - :heartbeat_timeout_threshold => '60', - :heartbeat_rate => '10', - :heartbeat_in_pthread => true, - :kombu_reconnect_delay => '5.0', - :amqp_durable_queues => true, - :kombu_compression => 'gzip', - :kombu_ssl_ca_certs => '/etc/ca.cert', - :kombu_ssl_certfile => '/etc/certfile', - :kombu_ssl_keyfile => '/etc/key', - :kombu_ssl_version => 'TLSv1', - :rabbit_ha_queues => true, - :rabbit_retry_interval => '1', + :rabbit_use_ssl => true, + :heartbeat_timeout_threshold => '60', + :heartbeat_rate => '10', + :heartbeat_in_pthread => true, + :kombu_reconnect_delay => '5.0', + :amqp_durable_queues => true, + :kombu_compression => 'gzip', + :kombu_ssl_ca_certs => '/etc/ca.cert', + :kombu_ssl_certfile => '/etc/certfile', + :kombu_ssl_keyfile => '/etc/key', + :kombu_ssl_version => 'TLSv1', + :rabbit_ha_queues => true, + :rabbit_quorum_queue => true, + :rabbit_quorum_delivery_limit => 3, + :rabbit_quorum_max_memory_length => 5, + :rabbit_quorum_max_memory_bytes => 1073741824, + :rabbit_retry_interval => '1', ) is_expected.to contain_oslo__messaging__amqp('nova_config').with( :idle_timeout => '60',