From 6a21e2e2676f6637330bd22ee64ef8f58c5f73e0 Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Tue, 21 May 2024 13:51:48 +0100 Subject: [PATCH] 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/+/919701 Change-Id: Idf33b6810e1afb3a89dad5e65a48e86ac0a58a67 --- playbooks/rabbitmq-install.yml | 13 +++++++++++++ .../rabbitmq-feature-flags-d1a0f3fd4e17cbf4.yaml | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 releasenotes/notes/rabbitmq-feature-flags-d1a0f3fd4e17cbf4.yaml diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index abc052c355..0ed735d12e 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -43,6 +43,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 diff --git a/releasenotes/notes/rabbitmq-feature-flags-d1a0f3fd4e17cbf4.yaml b/releasenotes/notes/rabbitmq-feature-flags-d1a0f3fd4e17cbf4.yaml new file mode 100644 index 0000000000..f76039847b --- /dev/null +++ b/releasenotes/notes/rabbitmq-feature-flags-d1a0f3fd4e17cbf4.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Stable RabbitMQ feature flags will be enabled automatically pre-upgrade + in order to prevent failures during the upgrade process.