From c497ee6616c43d661ccad5f5af30687c6db876cd Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Mon, 3 Feb 2025 16:14:11 +0000 Subject: [PATCH 1/2] Bump ansible-lint python requirements --- .github/workflows/stackhpc-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stackhpc-pull-request.yml b/.github/workflows/stackhpc-pull-request.yml index 7f9ae395c..b5cf19c06 100644 --- a/.github/workflows/stackhpc-pull-request.yml +++ b/.github/workflows/stackhpc-pull-request.yml @@ -69,9 +69,9 @@ jobs: matrix: include: # NOTE(upgrade): Keep these in sync with Kayobe's supported Ansible and Python versions (see release notes). - - ansible: "2.16" + - ansible: "2.17" python: "3.12" - - ansible: "2.15" + - ansible: "2.16" python: "3.10" name: Ansible ${{ matrix.ansible }} lint with Python ${{ matrix.python }} if: github.repository == 'stackhpc/stackhpc-kayobe-config' From 840eb9e43d92491fda662041d88860f2bd526a3d Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Tue, 4 Feb 2025 15:42:07 +0000 Subject: [PATCH 2/2] Update rabbitmq-reset for Epoxy With the introduction of oslo.messaging Queue Manager, we need to clear shared memory when wiping queues from RabbitMQ. This is because oslo.messaging assumes that a queue with an entry under shared memory exists in the RabbitMQ cluster. With the introduction of durable queues for reply/fanout queues, we need stop the services before wiping queues from RabbitMQ. This is because fanout queues in particular are not just created on container startup, so services may attempt to use them after the RabbitMQ state has been reset. Removes the tags as it no longer makes sense to only run part of this playbook. --- etc/kayobe/ansible/rabbitmq-reset.yml | 28 +++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/etc/kayobe/ansible/rabbitmq-reset.yml b/etc/kayobe/ansible/rabbitmq-reset.yml index e910d7765..b0235ab44 100644 --- a/etc/kayobe/ansible/rabbitmq-reset.yml +++ b/etc/kayobe/ansible/rabbitmq-reset.yml @@ -2,12 +2,25 @@ # Reset a broken RabbitMQ cluster. # Also restarts all OpenStack services using RabbitMQ. +- name: Stop OpenStack services + hosts: controllers:compute:storage + become: true + gather_facts: false + tasks: + # The following services use RabbitMQ. + - name: Stop OpenStack services + ansible.builtin.shell: + cmd: >- + set -o pipefail && + systemctl -a | egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | + awk '{ print $NF }' | + xargs systemctl stop + executable: "/bin/bash" + - name: Reset RabbitMQ hosts: controllers become: true gather_facts: false - tags: - - rabbitmq-reset vars: container_name: rabbitmq tasks: @@ -59,18 +72,21 @@ ansible.builtin.command: docker exec {{ container_name }} /bin/bash -c 'rabbitmqctl await_online_nodes {{ groups['controllers'] | length }}' - name: Restart OpenStack services - hosts: controllers:compute + hosts: controllers:compute:storage become: true gather_facts: false - tags: - - restart-openstack tasks: + - name: Clear shared memory + ansible.builtin.shell: + cmd: > + rm -rf /dev/shm/*_qmanager + # The following services use RabbitMQ. - name: Restart OpenStack services ansible.builtin.shell: cmd: >- set -o pipefail && systemctl -a | egrep 'kolla-(barbican|blazar|cinder|cloudkitty|designate|heat|ironic|keystone|magnum|manila|neutron|nova|octavia)' | - awk '{ print $1 }' | + awk '{ print $NF }' | xargs systemctl restart executable: "/bin/bash"