Enable RabbitMQ feature flags pre-upgrade

This task must be carried out before any RabbitMQ instances are
stopped, so must live in the playbook as opposed to the role.

This complements the post-upgrade enablement which happens within
the role itself, and covers the case where older versions of the
role have not already enabled the relevant flags.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-rabbitmq_server/+/920999
Change-Id: Idf33b6810e1afb3a89dad5e65a48e86ac0a58a67
(cherry picked from commit 6a21e2e267)
This commit is contained in:
Andrew Bonney 2024-05-21 13:51:48 +01:00 committed by Marc Gariepy
parent 8a5b45041c
commit 9e12af6c99
3 changed files with 19 additions and 1 deletions

View File

@ -260,7 +260,7 @@
- name: rabbitmq_server
scm: git
src: https://opendev.org/openstack/openstack-ansible-rabbitmq_server
version: 2e849ca843d9f23f5b7feabb73a1c4788c9140e0
version: a61e85039b5edd8b39f3585dfa11eabc47046812
trackbranch: stable/2023.1
shallow_since: '2024-05-05'
- name: repo_server

View File

@ -40,6 +40,19 @@
tags:
- rabbitmq
# Stable feature flags must be enabled pre-upgrade
# https://www.rabbitmq.com/docs/feature-flags#version-compatibility
- name: Enable stable feature flags pre-upgrade
hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}[0]"
gather_facts: false
user: root
tasks:
- name: Running feature flags tasks from the role
import_role:
name: rabbitmq_server
tasks_from: rabbitmq_feature_flags.yml
when: rabbitmq_upgrade | default(false) | bool
# The cluster must be stopped when doing major/minor upgrades
# http://www.rabbitmq.com/clustering.html#upgrading
- name: Stop RabbitMQ nodes that are not the upgrader

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Stable RabbitMQ feature flags will be enabled automatically pre-upgrade
in order to prevent failures during the upgrade process.