Rework quorum queues precheck
Change-Id: Ic9bd25a09b860838910dbe3d55f94421a0461c57
This commit is contained in:
parent
be5dc32c86
commit
afa241788d
@ -227,26 +227,25 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: List RabbitMQ queues
|
- name: List RabbitMQ queues
|
||||||
become: true
|
become: true
|
||||||
shell:
|
command: "{{ kolla_container_engine }} exec rabbitmq rabbitmqctl list_queues --silent name type --formatter json"
|
||||||
# TODO(mattcrees): remove ``| egrep -v '(fanout|reply)'`` once https://review.opendev.org/c/openstack/oslo.messaging/+/888479 is merged.
|
|
||||||
cmd: "{{ kolla_container_engine }} exec rabbitmq rabbitmqctl list_queues --silent name type | egrep -v '(fanout|reply)' | awk '{ print $NF }'"
|
|
||||||
register: rabbitmq_queues
|
register: rabbitmq_queues
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: false
|
check_mode: false
|
||||||
|
|
||||||
- name: Filter RabbitMQ queue types
|
|
||||||
set_fact:
|
|
||||||
rabbitmq_queue_types: "{{ rabbitmq_queues.stdout | split | unique }}"
|
|
||||||
|
|
||||||
- name: Check if RabbitMQ quorum queues need to be configured
|
- name: Check if RabbitMQ quorum queues need to be configured
|
||||||
assert:
|
assert:
|
||||||
that: "{{ (rabbitmq_queue_types | length == 1) and (rabbitmq_queue_types | first == 'quorum') }}"
|
that: "{{ item.type == 'quorum' }}"
|
||||||
fail_msg: >
|
fail_msg: >
|
||||||
om_enable_rabbitmq_quorum_queues is True but non-quorum queues have been found.
|
om_enable_rabbitmq_quorum_queues is True but {{ item.name }} is a non-quorum queue.
|
||||||
Currently the procedure to migrate to quorum queues is manual.
|
Currently the procedure to migrate to quorum queues is manual.
|
||||||
Please follow the process described here: https://docs.openstack.org/kolla-ansible/latest/reference/message-queues/rabbitmq.html#high-availability.
|
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 degredation in performance at large scale.
|
Note that this process may take several hours on larger systems, and may cause a degredation in performance at large scale.
|
||||||
If you do not wish to enable this feature, set om_enable_rabbitmq_quorum_queues to False.
|
If you do not wish to enable this feature, set om_enable_rabbitmq_quorum_queues to False.
|
||||||
|
loop: "{{ (rabbitmq_queues.stdout | from_json) if rabbitmq_queues is not skipped else [] }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.name }}"
|
||||||
|
# TODO(mattcress): remove skipping reply and fanout once https://review.opendev.org/c/openstack/oslo.messaging/+/888479 is merged.
|
||||||
|
when: not (item.name is search('reply_') or item.name is search('_fanout_'))
|
||||||
|
|
||||||
run_once: true
|
run_once: true
|
||||||
when:
|
when:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user