From d888e8815d623c7676eac81d5522c25ceb4abe02 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Thu, 21 Mar 2024 09:23:47 +0000 Subject: [PATCH] CI: rework RabbitMQ handling in upgrades Changes the process so that queues are migrated using the previous release kayobe config. Migrations only need to be run in SLURP jobs. Also upgrades to RabbitMQ 3.13 prior to a SLURP upgrade. Related-Bug: #2058512 Depends-On: https://review.opendev.org/c/openstack/kayobe/+/930912 Change-Id: I9a6cf1734989f4015868e4e9e911bd9acb73a516 --- dev/functions | 24 ------------------- .../kayobe-overcloud-upgrade-base/run.yml | 20 ++++++++++++++++ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/dev/functions b/dev/functions index 88630cf6f..8455ba2ad 100644 --- a/dev/functions +++ b/dev/functions @@ -494,35 +494,11 @@ function overcloud_deploy { echo "Control plane deployment complete" } -function migrate_rabbitmq_queues { - echo "Migrating to RabbitMQ HA queues" - - environment_setup - - kayobe overcloud service configuration generate --node-config-dir /etc/kolla - - kayobe kolla ansible run "stop --yes-i-really-really-mean-it" -kt ironic,keystone,neutron,nova - - kayobe overcloud service upgrade -kt rabbitmq --skip-prechecks - - kayobe kolla ansible run rabbitmq-reset-state - - kayobe kolla ansible run deploy -kt ironic,keystone,neutron,nova -} - function overcloud_upgrade { # Upgrade a kayobe control plane. echo "Upgrading a kayobe development environment. This consists of a " echo "single node OpenStack control plane." - # NOTE(mattcrees): As om_enable_rabbitmq_quorum_queues now defaults to true - # from Bobcat, we need to perform a migration to durable queues during - # SLURP upgrades from Antelope to Caracal. - # TODO(mattcrees): Remove in Dalmatian. - if [[ $IS_SLURP == "True" ]]; then - migrate_rabbitmq_queues - fi - echo "Upgrading Kayobe" upgrade_kayobe_venv diff --git a/playbooks/kayobe-overcloud-upgrade-base/run.yml b/playbooks/kayobe-overcloud-upgrade-base/run.yml index 98fdc44d0..73c7c2ba1 100644 --- a/playbooks/kayobe-overcloud-upgrade-base/run.yml +++ b/playbooks/kayobe-overcloud-upgrade-base/run.yml @@ -84,6 +84,26 @@ # Upgrade Kayobe, and use it to perform an upgrade of the control plane. + - name: Ensure RabbitMQ is upgraded prior to a SLURP upgrade + shell: + cmd: dev/rabbitmq-pre-slurp-upgrade.sh &> {{ logs_dir }}/ansible/rabbitmq-pre-slurp-upgrade + chdir: "{{ previous_kayobe_src_dir }}" + executable: /bin/bash + when: is_slurp + environment: + KAYOBE_CONFIG_SOURCE_PATH: "{{ previous_kayobe_config_src_dir }}" + KAYOBE_SOURCE_PATH: "{{ previous_kayobe_src_dir }}" + + - name: Ensure RabbitMQ queues are migrated + shell: + cmd: dev/rabbitmq-migrate-queues.sh ironic,keystone,neutron,nova &> {{ logs_dir }}/ansible/rabbitmq-migrate-queues + chdir: "{{ previous_kayobe_src_dir }}" + executable: /bin/bash + when: is_slurp + environment: + KAYOBE_CONFIG_SOURCE_PATH: "{{ previous_kayobe_config_src_dir }}" + KAYOBE_SOURCE_PATH: "{{ previous_kayobe_src_dir }}" + - name: Ensure overcloud is upgraded shell: cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh &> {{ logs_dir }}/ansible/overcloud-upgrade"