Merge "Allow removal of classic queue mirroring for internal RabbitMQ" into stable/victoria
This commit is contained in:
commit
c75d83aa26
|
@ -74,6 +74,8 @@ rabbitmq_server_additional_erl_args: "+S 2:2 +sbwt none +sbwtdcpu none +sbwtdio
|
||||||
rabbitmq_tls_options: {}
|
rabbitmq_tls_options: {}
|
||||||
# To avoid split-brain
|
# To avoid split-brain
|
||||||
rabbitmq_cluster_partition_handling: "pause_minority"
|
rabbitmq_cluster_partition_handling: "pause_minority"
|
||||||
|
# Whether to remove the ha-all policy.
|
||||||
|
rabbitmq_remove_ha_all_policy: false
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Plugins
|
# Plugins
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
---
|
---
|
||||||
|
- include_tasks: remove-ha-all-policy.yml
|
||||||
|
when: rabbitmq_remove_ha_all_policy | bool
|
||||||
|
|
||||||
- import_tasks: config.yml
|
- import_tasks: config.yml
|
||||||
|
|
||||||
- import_tasks: check-containers.yml
|
- import_tasks: check-containers.yml
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: Get container facts
|
||||||
|
become: true
|
||||||
|
kolla_container_facts:
|
||||||
|
name:
|
||||||
|
- "{{ service.container_name }}"
|
||||||
|
register: container_facts
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: List RabbitMQ policies
|
||||||
|
become: true
|
||||||
|
command: "docker exec {{ service.container_name }} rabbitmqctl list_policies --silent"
|
||||||
|
register: rabbitmq_policies
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
# NOTE(dszumski): This can be removed in the Zed cycle
|
||||||
|
- name: Remove ha-all policy from RabbitMQ
|
||||||
|
become: true
|
||||||
|
command: "docker exec {{ service.container_name }} rabbitmqctl clear_policy ha-all"
|
||||||
|
when:
|
||||||
|
- "'ha-all' in rabbitmq_policies.stdout"
|
||||||
|
when: container_facts[service.container_name] is defined
|
||||||
|
|
||||||
|
delegate_to: "{{ groups[role_rabbitmq_groups] | first }}"
|
||||||
|
run_once: true
|
||||||
|
vars:
|
||||||
|
service_name: "rabbitmq"
|
||||||
|
service: "{{ rabbitmq_services[service_name] }}"
|
|
@ -16,6 +16,9 @@
|
||||||
when: inventory_hostname in groups[role_rabbitmq_groups]
|
when: inventory_hostname in groups[role_rabbitmq_groups]
|
||||||
register: rabbitmq_differs
|
register: rabbitmq_differs
|
||||||
|
|
||||||
|
- include_tasks: remove-ha-all-policy.yml
|
||||||
|
when: rabbitmq_remove_ha_all_policy | bool
|
||||||
|
|
||||||
- import_tasks: config.yml
|
- import_tasks: config.yml
|
||||||
|
|
||||||
- import_tasks: check-containers.yml
|
- import_tasks: check-containers.yml
|
||||||
|
|
|
@ -16,9 +16,13 @@
|
||||||
{"user": "{{ murano_agent_rabbitmq_user }}", "vhost": "{{ murano_agent_rabbitmq_vhost }}", "configure": ".*", "write": ".*", "read": ".*"}
|
{"user": "{{ murano_agent_rabbitmq_user }}", "vhost": "{{ murano_agent_rabbitmq_vhost }}", "configure": ".*", "write": ".*", "read": ".*"}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
],
|
],
|
||||||
|
{% if rabbitmq_remove_ha_all_policy | bool %}
|
||||||
|
"policies":[]
|
||||||
|
{% else %}
|
||||||
"policies":[
|
"policies":[
|
||||||
{"vhost": "/", "name": "ha-all", "pattern": ".*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}{% if project_name == 'outward_rabbitmq' %},
|
{"vhost": "/", "name": "ha-all", "pattern": ".*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}{% if project_name == 'outward_rabbitmq' %},
|
||||||
{"vhost": "{{ murano_agent_rabbitmq_vhost }}", "name": "ha-all", "pattern": ".*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}
|
{"vhost": "{{ murano_agent_rabbitmq_vhost }}", "name": "ha-all", "pattern": ".*", "apply-to": "all", "definition": {"ha-mode":"all"}, "priority":0}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
]
|
]
|
||||||
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue where RabbitMQ was configured to mirror classic transient
|
||||||
|
queues for all services. According to the RabbitMQ documentation this is
|
||||||
|
not a supported configuration, and contributed to numerous bug reports.
|
||||||
|
In order to avoid making unexpected changes to the RabbitMQ cluster, it is
|
||||||
|
necessary to set ``rabbitmq_remove_ha_all_policy`` to ``yes`` in order to
|
||||||
|
apply this fix. This variable will be removed in the Yoga release.
|
||||||
|
`LP#1954925 <https://launchpad.net/bugs/1954925>`__
|
Loading…
Reference in New Issue