From 1787a43986ded7a730e0c5b215cb3a003cc551c7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 10 May 2024 18:58:29 +0200 Subject: [PATCH] Add qos_prefetch_count to variables When rabbit_stream_fanout is set to true, rabbit_qos_prefetch_count should be set to a positive value. This also fixes defenition of transient_quorum_queue as if rabbit_stream_fanout is enabled - transient_quorum_queue should be also enabled. [1] [1] https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L726-L736 Change-Id: I4d3c9f792f01eb6d9cfa077d70a70daa6524d216 --- defaults/main.yml | 5 +++-- templates/heat.conf.j2 | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0826679..d5f3444 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -112,9 +112,10 @@ heat_oslomsg_notify_policies: [] ## RabbitMQ integration heat_oslomsg_rabbit_quorum_queues: "{{ oslomsg_rabbit_quorum_queues | default(True) }}" -heat_oslomsg_rabbit_transient_quorum_queues: "{{ oslomsg_rabbit_transient_quorum_queues | default(heat_oslomsg_rabbit_quorum_queues) }}" -heat_oslomsg_rabbit_queue_manager: "{{ oslomsg_rabbit_queue_manager | default(heat_oslomsg_rabbit_quorum_queues) }}" heat_oslomsg_rabbit_stream_fanout: "{{ oslomsg_rabbit_stream_fanout | default(heat_oslomsg_rabbit_quorum_queues) }}" +heat_oslomsg_rabbit_transient_quorum_queues: "{{ oslomsg_rabbit_transient_quorum_queues | default(heat_oslomsg_rabbit_stream_fanout) }}" +heat_oslomsg_rabbit_qos_prefetch_count: "{{ oslomsg_rabbit_qos_prefetch_count | default(heat_oslomsg_rabbit_stream_fanout | ternary(10, 0)) }}" +heat_oslomsg_rabbit_queue_manager: "{{ oslomsg_rabbit_queue_manager | default(heat_oslomsg_rabbit_quorum_queues) }}" heat_oslomsg_rabbit_quorum_delivery_limit: "{{ oslomsg_rabbit_quorum_delivery_limit | default(0) }}" heat_oslomsg_rabbit_quorum_max_memory_bytes: "{{ oslomsg_rabbit_quorum_max_memory_bytes | default(0) }}" diff --git a/templates/heat.conf.j2 b/templates/heat.conf.j2 index 373ce21..16d9529 100644 --- a/templates/heat.conf.j2 +++ b/templates/heat.conf.j2 @@ -65,7 +65,8 @@ bind_port = {{ heat_cfn_service_port }} [oslo_messaging_rabbit] ssl = {{ heat_oslomsg_rpc_use_ssl }} rabbit_quorum_queue = {{ heat_oslomsg_rabbit_quorum_queues }} -transient_quorum_queue = {{ heat_oslomsg_rabbit_transient_quorum_queues }} +rabbit_transient_quorum_queue = {{ heat_oslomsg_rabbit_transient_quorum_queues }} +rabbit_qos_prefetch_count = {{ heat_oslomsg_rabbit_qos_prefetch_count }} use_queue_manager = {{ heat_oslomsg_rabbit_queue_manager }} rabbit_stream_fanout = {{ heat_oslomsg_rabbit_stream_fanout }} rabbit_quorum_delivery_limit = {{ heat_oslomsg_rabbit_quorum_delivery_limit }}