File: Add-queue_manager-and-stream_fanout.patch

package info (click to toggle)
puppet-module-glance 25.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,916 kB
  • sloc: ruby: 5,895; python: 38; makefile: 11; sh: 10
file content (91 lines) | stat: -rw-r--r-- 4,594 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Author: Thomas Goirand <zigo@debian.org>
Date: Mon, 30 Jun 2025 16:31:33 +0200
Description: Add queue_manager and stream_fanout
 This patch adds two new parameters to the glance::notify::rabbitmq class:
 - rabbit_use_queue_manager
 - rabbit_stream_fanout
 .
 that are already handled by the oslo::messaging::rabbit class, which
 makes it impossible to set using glance_api_config.
Change-Id: I3e118d4c58778a3e887e710cde83ddbfa8c2877b
Forwarded: https://review.opendev.org/c/openstack/puppet-glance/+/953780
Last-Update: 2025-06-30

Index: puppet-module-glance/manifests/notify/rabbitmq.pp
===================================================================
--- puppet-module-glance.orig/manifests/notify/rabbitmq.pp
+++ puppet-module-glance/manifests/notify/rabbitmq.pp
@@ -83,6 +83,14 @@
 #   (Optional) Limit the number of memory bytes used by the quorum queue.
 #   Defaults to $facts['os_service_default']
 #
+# [*rabbit_use_queue_manager*]
+#   (Optional) Should we use consistant queue names or random ones.
+#   Defaults to $facts['os_service_default']
+#
+# [*rabbit_stream_fanout*]
+#   (Optional) Use stream queues in RabbitMQ (x-queue-type: stream).
+#   Defaults to $facts['os_service_default']
+#
 # [*rabbit_enable_cancel_on_failover*]
 #   (Optional) Enable x-cancel-on-ha-failover flag so that rabbitmq server will
 #   cancel and notify consumers when queue is down.
@@ -177,6 +185,8 @@ class glance::notify::rabbitmq(
   $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_use_queue_manager           = $facts['os_service_default'],
+  $rabbit_stream_fanout               = $facts['os_service_default'],
   $rabbit_enable_cancel_on_failover   = $facts['os_service_default'],
   $rabbit_use_ssl                     = $facts['os_service_default'],
   $kombu_ssl_ca_certs                 = $facts['os_service_default'],
@@ -228,6 +238,8 @@ Use the notification_topic parameter ins
     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,
+    use_queue_manager               => $rabbit_use_queue_manager,
+    rabbit_stream_fanout            => $rabbit_stream_fanout,
     enable_cancel_on_failover       => $rabbit_enable_cancel_on_failover,
   }
 
Index: puppet-module-glance/releasenotes/notes/queue_manager-and-stream_fanout-3b4ca0607c93d9f4.yaml
===================================================================
--- /dev/null
+++ puppet-module-glance/releasenotes/notes/queue_manager-and-stream_fanout-3b4ca0607c93d9f4.yaml
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    The ``glance::notify::rabbitmq`` class now has two new parameters
+    ``rabbit_use_queue_manager`` and ``rabbit_stream_fanout``.
Index: puppet-module-glance/spec/classes/glance_notify_rabbitmq_spec.rb
===================================================================
--- puppet-module-glance.orig/spec/classes/glance_notify_rabbitmq_spec.rb
+++ puppet-module-glance/spec/classes/glance_notify_rabbitmq_spec.rb
@@ -25,6 +25,8 @@ describe 'glance::notify::rabbitmq' do
         :rabbit_quorum_delivery_limit    => '<SERVICE DEFAULT>',
         :rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
         :rabbit_quorum_max_memory_bytes  => '<SERVICE DEFAULT>',
+        :use_queue_manager               => '<SERVICE DEFAULT>',
+        :rabbit_stream_fanout            => '<SERVICE DEFAULT>',
         :enable_cancel_on_failover       => '<SERVICE DEFAULT>',
       ) }
 
@@ -61,6 +63,8 @@ describe 'glance::notify::rabbitmq' do
           :rabbit_quorum_delivery_limit       => 3,
           :rabbit_quorum_max_memory_length    => 5,
           :rabbit_quorum_max_memory_bytes     => 1073741824,
+          :rabbit_use_queue_manager           => true,
+          :rabbit_stream_fanout               => true,
           :rabbit_enable_cancel_on_failover   => false,
           :rabbit_use_ssl                     => true,
           :kombu_ssl_ca_certs                 => '/etc/ca.cert',
@@ -101,6 +105,8 @@ describe 'glance::notify::rabbitmq' do
         :rabbit_quorum_delivery_limit    => 3,
         :rabbit_quorum_max_memory_length => 5,
         :rabbit_quorum_max_memory_bytes  => 1073741824,
+        :use_queue_manager               => true,
+        :rabbit_stream_fanout            => true,
         :enable_cancel_on_failover       => false,
       ) }