Add variable to control queues redundancy
Since we have 2 redundancy scenarios that are controlled independnetly and are exclusive, we add variable to disable any queues redundancy. This also allows to adjust logic of classic queues versioning, since usage of CQv2 with classic mirrored queues may result in reduced performance as CQv2 do not have optimizations for mirrored queues [1] [1] https://blog.rabbitmq.com/posts/2023/05/rabbitmq-3.12-performance-improvements/#classic-queues-massively-improved-classic-queues-v2-cqv2 Change-Id: I81c7e9ce0ed090d7b87ba865c7dd5b4b706701d5
This commit is contained in:

committed by
Dmitriy Rabotyagov

parent
fd4e041608
commit
7b4640d5fb
@@ -87,7 +87,7 @@ to the rabbitmq server backend.
|
||||
|
||||
.. literalinclude:: ../../../../inventory/group_vars/all/oslo-messaging.yml
|
||||
:language: yaml
|
||||
:start-after: ## Main
|
||||
:start-after: under the License.
|
||||
|
||||
.. _oslo-messaging.yml: https://github.com/openstack/openstack-ansible/blob/master/inventory/group_vars/all/oslo-messaging.yml
|
||||
|
||||
|
@@ -24,18 +24,24 @@ rabbitmq_servers: >-
|
||||
| map('extract', hostvars, 'management_address')
|
||||
| list | join(',')
|
||||
}}
|
||||
|
||||
# If you do not want to use neither quorum queues nor classic mirror queues,
|
||||
# set rabbitmq_queue_replication to False
|
||||
rabbitmq_queue_replication: True
|
||||
oslomsg_rabbit_quorum_queues: False
|
||||
|
||||
rabbitmq_policies:
|
||||
- name: "HA"
|
||||
pattern: '^(?!(amq\.)|(.*_fanout_)|(reply_)).*'
|
||||
priority: 0
|
||||
tags: "ha-mode=all"
|
||||
state: "{{ (oslomsg_rabbit_quorum_queues | default(True)) | ternary('absent', 'present') }}"
|
||||
state: "{{ (oslomsg_rabbit_quorum_queues | default(True) or not rabbitmq_queue_replication) | ternary('absent', 'present') }}"
|
||||
- name: CQv2
|
||||
pattern: '.*'
|
||||
priority: 0
|
||||
tags:
|
||||
queue-version: 2
|
||||
state: "{{ (oslomsg_rabbit_quorum_queues | default(True)) | ternary('absent', 'present') }}"
|
||||
state: "{{ (oslomsg_rabbit_quorum_queues | default(True) or not rabbitmq_queue_replication) | ternary('present', 'absent') }}"
|
||||
|
||||
## Galera options
|
||||
galera_client_package_state: "{{ package_state }}"
|
||||
|
@@ -12,9 +12,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
## Main
|
||||
oslomsg_rabbit_quorum_queues: False
|
||||
|
||||
# RPC
|
||||
oslomsg_rpc_transport: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary('amqp', 'rabbit') }}"
|
||||
oslomsg_rpc_port: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_port, rabbitmq_port) }}"
|
||||
|
@@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new variable ``rabbitmq_queue_replication`` that allows to control
|
||||
if any redundancy features (like quorum queues or classic mirrored queues)
|
||||
will be used.
|
||||
By default it is set to ``True``.
|
Reference in New Issue
Block a user