Remove om_enable_rabbitmq_high_availability

We're going to upgrade RabbitMQ to 4.0, so this option will not longer
be supported.

Change-Id: Ide75a8c9086798bf4bdf5bc02d4a1be17017884f
This commit is contained in:
Matt Crees 2025-02-04 11:02:28 +00:00
parent 6ca5ed84ba
commit 8f0a4f6726
33 changed files with 7 additions and 121 deletions
ansible
group_vars
roles
aodh/templates
barbican/templates
blazar/templates
ceilometer/templates
cinder/templates
cloudkitty/templates
cyborg/templates
designate/templates
glance/templates
heat/templates
ironic/templates
keystone/templates
magnum/templates
manila/templates
masakari/templates
mistral/templates
neutron/templates
nova-cell/templates
nova/templates
octavia/templates
prechecks/tasks
rabbitmq
tacker/templates
trove/templates
watcher/templates
zun/templates
releasenotes/notes

@ -275,8 +275,6 @@ om_enable_rabbitmq_tls: "{{ rabbitmq_enable_tls | bool }}"
om_rabbitmq_cacert: "{{ rabbitmq_cacert }}"
om_rabbitmq_qos_prefetch_count: "1"
om_enable_rabbitmq_high_availability: false
# Only enable quorum queues if you disable om_enable_rabbitmq_high_availability
om_enable_rabbitmq_quorum_queues: true
om_enable_queue_manager: true
# Enabling om_enable_rabbitmq_transient_quorum_queue will have no effect

@ -72,9 +72,6 @@ heartbeat_in_pthread = {{ service_name == 'aodh-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -92,9 +92,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -63,9 +63,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -44,9 +44,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -82,9 +82,6 @@ heartbeat_in_pthread = {{ service_name == 'cinder-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -56,9 +56,6 @@ heartbeat_in_pthread = {{ service_name == 'cloudkitty-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -78,9 +78,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -101,9 +101,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -121,9 +121,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -83,9 +83,6 @@ heartbeat_in_pthread = {{ service_name == 'heat-api' or service_name == 'heat-ap
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -21,9 +21,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -52,9 +52,6 @@ heartbeat_in_pthread = {{ service_name == 'ironic-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -71,9 +71,6 @@ heartbeat_in_pthread = {{ service_name == 'keystone' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -135,9 +135,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -65,9 +65,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -62,9 +62,6 @@ heartbeat_in_pthread = {{ service_name == 'masakari-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -81,9 +81,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -140,9 +140,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -200,9 +200,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -150,9 +150,6 @@ heartbeat_in_pthread = {{ service_name == 'nova-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -135,9 +135,6 @@ heartbeat_in_pthread = {{ service_name == 'octavia-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -64,13 +64,6 @@
when:
- (enable_ceph | default()) | bool
- name: Validate rabbitmq variables
run_once: True
fail:
msg: |
Please set only one of om_enable_rabbitmq_high_availability or om_enable_rabbitmq_quorum_queues
when: (om_enable_rabbitmq_high_availability | bool) == (om_enable_rabbitmq_quorum_queues | bool)
- name: Validate rabbitmq quorum/stream variables
run_once: True
fail:

@ -2,8 +2,6 @@
- import_tasks: version-check.yml
- include_tasks: remove-ha-all-policy.yml
when:
- not om_enable_rabbitmq_high_availability | bool
- import_tasks: config.yml

@ -105,30 +105,6 @@
- not kolla_externally_managed_cert | bool
- rabbitmq_enable_tls | bool
- block:
- name: List RabbitMQ policies
become: true
command: "{{ kolla_container_engine }} exec rabbitmq rabbitmqctl list_policies --silent"
register: rabbitmq_policies
changed_when: false
check_mode: false
- name: Check if RabbitMQ HA needs to be configured
assert:
that: "'ha-all' in rabbitmq_policies.stdout"
fail_msg: >
om_enable_rabbitmq_high_availability is True but no mirroring policy has been found.
Currently the procedure to migrate from transient non-mirrored queues to durable mirrored queues is manual.
Please follow the process described here: https://docs.openstack.org/kolla-ansible/latest/reference/message-queues/rabbitmq.html#high-availability.
Note that this process may take several hours on larger systems, and may cause a degradation in performance at large scale.
If you do not wish to enable this feature, set om_enable_rabbitmq_high_availability to False.
run_once: true
when:
- container_facts.containers['rabbitmq'] is defined
- om_enable_rabbitmq_high_availability | bool
tags: rabbitmq-ha-precheck
- block:
- name: List RabbitMQ queues
become: true

@ -2,8 +2,6 @@
- import_tasks: version-check.yml
- include_tasks: remove-ha-all-policy.yml
when:
- not om_enable_rabbitmq_high_availability | bool
- import_tasks: config.yml

@ -10,11 +10,5 @@
{"user": "{{ role_rabbitmq_user }}", "vhost": "/", "configure": ".*", "write": ".*", "read": ".*"}{% if role_rabbitmq_monitoring_user is defined and role_rabbitmq_monitoring_user %},
{"user": "{{ role_rabbitmq_monitoring_user }}", "vhost": "/", "configure": "^$", "write": "^$", "read": ".*"}{% endif %}
],
{% if om_enable_rabbitmq_high_availability | bool %}
"policies":[
{"vhost": "/", "name": "ha-all", "pattern": "^(?!(amq\\.)|(.*_fanout_)|(reply_)).*", "apply-to": "all", "definition": {"ha-mode":{% if rabbitmq_ha_replica_count is not none %}"exactly","ha-params":{{ rabbitmq_ha_replica_count | int }}{% else %}"all"{% endif %}{% if rabbitmq_ha_promote_on_shutdown is not none %},"ha-promote-on-shutdown":"{{ rabbitmq_ha_promote_on_shutdown }}"{% endif %}{% if rabbitmq_message_ttl_ms is not none %},"message-ttl":{{ rabbitmq_message_ttl_ms | int }}{% endif %}{% if rabbitmq_queue_expiry_ms is not none %},"expires":{{ rabbitmq_queue_expiry_ms | int }}{% endif %}}, "priority":0}
]
{% else %}
"policies":[]
{% endif %}
}

@ -77,9 +77,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -21,9 +21,6 @@ username = {{ trove_keystone_user }}
use_queue_manager = true
{% endif %}
heartbeat_in_pthread = false
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -82,9 +82,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -68,9 +68,6 @@ heartbeat_in_pthread = false
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -138,9 +138,6 @@ heartbeat_in_pthread = {{ service_name == 'zun-api' }}
ssl = true
ssl_ca_file = {{ om_rabbitmq_cacert }}
{% endif %}
{% if om_enable_rabbitmq_high_availability | bool %}
amqp_durable_queues = true
{% endif %}
{% if om_enable_rabbitmq_quorum_queues | bool %}
rabbit_quorum_queue = true
{% if om_enable_rabbitmq_stream_fanout | bool %}

@ -0,0 +1,7 @@
---
upgrade:
- |
Removed the option the option ``om_enable_rabbitmq_high_availability``. If
you have not yet migrated to quorum queues, you will need to do so. See
docs:
https://docs.openstack.org/kolla-ansible/latest/reference/message-queues/rabbitmq.html#high-availability