From 63035f3214643ab86571c401abf757b3c265e7ac Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 1 Jul 2025 10:37:09 +0200 Subject: [PATCH] Expose rabbit_qos_prefetch_count The option was supported by puppet-oslo but was not configurable via this module. Change-Id: I113bbcf632bbd8dd645b0dc2dda48fda21f9d4e8 --- manifests/init.pp | 6 ++++++ .../notes/rabbit_qos_prefetch_count-55d76ced5e1d735f.yaml | 4 ++++ spec/classes/cloudkitty_init_spec.rb | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/rabbit_qos_prefetch_count-55d76ced5e1d735f.yaml diff --git a/manifests/init.pp b/manifests/init.pp index ea1aad8..c3d0b3d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,6 +27,10 @@ # every 30 seconds. # Defaults to $facts['os_service_default']. # +# [*rabbit_qos_prefetch_count*] +# (Optional) Specifies the number of messages to prefetch. +# Defaults to $facts['os_service_default'] +# # [*rabbit_quorum_queue*] # (Optional) Use quorum queues in RabbitMQ. # Defaults to $facts['os_service_default'] @@ -224,6 +228,7 @@ class cloudkitty( $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'], $rabbit_ha_queues = $facts['os_service_default'], + $rabbit_qos_prefetch_count = $facts['os_service_default'], $rabbit_quorum_queue = $facts['os_service_default'], $rabbit_transient_queues_ttl = $facts['os_service_default'], $rabbit_transient_quorum_queue = $facts['os_service_default'], @@ -289,6 +294,7 @@ class cloudkitty( heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_rate => $rabbit_heartbeat_rate, heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, + rabbit_qos_prefetch_count => $rabbit_qos_prefetch_count, kombu_ssl_version => $kombu_ssl_version, kombu_ssl_keyfile => $kombu_ssl_keyfile, kombu_ssl_certfile => $kombu_ssl_certfile, diff --git a/releasenotes/notes/rabbit_qos_prefetch_count-55d76ced5e1d735f.yaml b/releasenotes/notes/rabbit_qos_prefetch_count-55d76ced5e1d735f.yaml new file mode 100644 index 0000000..610efeb --- /dev/null +++ b/releasenotes/notes/rabbit_qos_prefetch_count-55d76ced5e1d735f.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``cloudkitty::rabbit_qos_prefetch_count`` parameter has been added. diff --git a/spec/classes/cloudkitty_init_spec.rb b/spec/classes/cloudkitty_init_spec.rb index df6afd6..0a9b1f9 100644 --- a/spec/classes/cloudkitty_init_spec.rb +++ b/spec/classes/cloudkitty_init_spec.rb @@ -44,6 +44,7 @@ describe 'cloudkitty' do :rabbit_ha_queues => '', :rabbit_retry_interval => '', :rabbit_quorum_queue => '', + :rabbit_qos_prefetch_count => '', :rabbit_transient_quorum_queue => '', :rabbit_transient_queues_ttl => '', :rabbit_quorum_delivery_limit => '', @@ -82,6 +83,7 @@ describe 'cloudkitty' do :rabbit_heartbeat_rate => 10, :rabbit_heartbeat_in_pthread => true, :rabbit_quorum_queue => true, + :rabbit_qos_prefetch_count => 10, :rabbit_transient_quorum_queue => false, :rabbit_transient_queues_ttl => 60, :rabbit_quorum_delivery_limit => 3, @@ -123,6 +125,7 @@ describe 'cloudkitty' do :kombu_compression => 'gzip', :rabbit_ha_queues => true, :rabbit_quorum_queue => true, + :rabbit_qos_prefetch_count => 10, :rabbit_transient_quorum_queue => false, :rabbit_transient_queues_ttl => 60, :rabbit_quorum_delivery_limit => 3,