From b86c304a2987d0e60570bcd43cbb08da9b64c241 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Wed, 10 May 2023 14:31:02 +0100 Subject: [PATCH] Enable RabbitMQ HA queues by default Sets the variable ``om_enable_rabbitmq_high_availability`` to ``true`` by default. An upgrade will therefore require some manual steps to migrate from transient to durable queues. Note that this will be caught by this precheck: https://review.opendev.org/c/openstack/kolla-ansible/+/880274 Also updates the CI upgrade jobs to perform this migration. This will need to be removed in Caracal. Related-Bug: #2031294 Change-Id: I26a70d4722aaa4663eced5f5337840474c7b961c --- ansible/group_vars/all.yml | 2 +- ...ha-queues-by-default-8a5bf2b3c18ae55b.yaml | 10 +++++++ tests/upgrade.sh | 30 ++++++++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/rabbitmq-enable-ha-queues-by-default-8a5bf2b3c18ae55b.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index c99a220888..6959fd4056 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -235,7 +235,7 @@ om_enable_rabbitmq_tls: "{{ rabbitmq_enable_tls | bool }}" # CA certificate bundle in containers using oslo.messaging with RabbitMQ TLS. om_rabbitmq_cacert: "{{ rabbitmq_cacert }}" -om_enable_rabbitmq_high_availability: false +om_enable_rabbitmq_high_availability: true #################### # Networking options diff --git a/releasenotes/notes/rabbitmq-enable-ha-queues-by-default-8a5bf2b3c18ae55b.yaml b/releasenotes/notes/rabbitmq-enable-ha-queues-by-default-8a5bf2b3c18ae55b.yaml new file mode 100644 index 0000000000..bf295d80bd --- /dev/null +++ b/releasenotes/notes/rabbitmq-enable-ha-queues-by-default-8a5bf2b3c18ae55b.yaml @@ -0,0 +1,10 @@ +--- +upgrade: + - | + The variable ``om_enable_rabbitmq_high_availability`` is now set to + ``True`` by default. An upgrade will therefore require some manual steps to + migrate from transient to durable queues. Note that this will be caught by + a precheck. + + See docs for details: + https://docs.openstack.org/kolla-ansible/zed/reference/message-queues/rabbitmq.html#high-availability diff --git a/tests/upgrade.sh b/tests/upgrade.sh index 23a77c9a97..fc0de80444 100755 --- a/tests/upgrade.sh +++ b/tests/upgrade.sh @@ -12,8 +12,36 @@ function upgrade { source $KOLLA_ANSIBLE_VENV_PATH/bin/activate - kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks + kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks --skip-tags rabbitmq-ha-precheck &> /tmp/logs/ansible/upgrade-prechecks kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull-upgrade + + # NOTE(mattcrees): As om_enable_rabbitmq_high_availability now defaults to + # true in Bobcat, we need to perform a migration to durable queues. + # TODO(mattcrees): Remove these steps in Caracal (and the precheck flag above). + SERVICE_TAGS="heat,keystone,neutron,nova" + if [[ $SCENARIO == "zun" ]] || [[ $SCENARIO == "cephadm" ]]; then + SERVICE_TAGS+=",cinder" + fi + if [[ $SCENARIO == "scenario_nfv" ]]; then + SERVICE_TAGS+=",barbican" + fi + if [[ $SCENARIO == "ironic" ]]; then + SERVICE_TAGS+=",ironic" + fi + if [[ $SCENARIO == "masakari" ]]; then + SERVICE_TAGS+=",masakari" + fi + if [[ $SCENARIO == "ovn" ]] || [[ $SCENARIO == "octavia" ]]; then + SERVICE_TAGS+=",octavia" + fi + if [[ $SCENARIO == "magnum" ]]; then + SERVICE_TAGS+=",magnum,designate" + fi + kolla-ansible -i ${RAW_INVENTORY} -vvv stop --tags $SERVICE_TAGS --yes-i-really-really-mean-it &> /tmp/logs/ansible/stop + kolla-ansible -i ${RAW_INVENTORY} -vvv genconfig &> /tmp/logs/ansible/genconfig + kolla-ansible -i ${RAW_INVENTORY} -vvv reconfigure --tags rabbitmq &> /tmp/logs/ansible/reconfigure-rabbitmq + kolla-ansible -i ${RAW_INVENTORY} -vvv rabbitmq-reset-state &> /tmp/logs/ansible/rabbitmq-reset-state + kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade # NOTE(yoctozepto): These actions remove the leftovers of the admin port.