64575519aa
This implements a global toggle `om_enable_rabbitmq_quorum_queues` to enable quorum queues for each service in RabbitMQ, similar to what was done for HA[0]. Quorum Queues are enabled by default. Quorum queues are more reliable, safer, simpler and faster than replicated mirrored classic queues[1]. Mirrored classic queues are deprecated and scheduled for removal in RabbitMQ 4.0[2]. Notice, that we do not need a new policy in the RabbitMQ definitions template, because their usage is enabled on the client side and can't be set using a policy[3]. Notice also, that quorum queues are not yet enabled in oslo.messaging for the usage of reply_ and fanout_ queues (transient queues). This will change once[4] is merged. [0]: https://review.opendev.org/c/openstack/kolla-ansible/+/867771 [1]: https://www.rabbitmq.com/quorum-queues.html [2]: https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/ [3]: https://www.rabbitmq.com/quorum-queues.html#declaring [4]: https://review.opendev.org/c/openstack/oslo.messaging/+/888479 Signed-off-by: Sven Kieske <kieske@osism.tech> Change-Id: I6c033d460a5c9b93c346e9e47e93b159d3c27830
54 lines
1.9 KiB
Bash
Executable File
54 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o xtrace
|
|
set -o errexit
|
|
|
|
# Enable unbuffered output for Ansible in Jenkins.
|
|
export PYTHONUNBUFFERED=1
|
|
|
|
|
|
function upgrade {
|
|
RAW_INVENTORY=/etc/kolla/inventory
|
|
|
|
source $KOLLA_ANSIBLE_VENV_PATH/bin/activate
|
|
|
|
kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks
|
|
|
|
# NOTE(mattcrees): As om_enable_rabbitmq_quorum_queues now defaults to
|
|
# true in Bobcat, we need to perform a migration to durable queues.
|
|
# TODO(mattcrees): Remove these steps in Caracal.
|
|
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 pull &> /tmp/logs/ansible/pull-upgrade
|
|
kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade
|
|
|
|
kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/upgrade-post-deploy
|
|
|
|
kolla-ansible -i ${RAW_INVENTORY} -vvv validate-config &> /tmp/logs/ansible/validate-config
|
|
}
|
|
|
|
|
|
upgrade
|