From 1ebd4bb6543cc8feb6ffd652ac527f5493b48a32 Mon Sep 17 00:00:00 2001 From: mciecier Date: Mon, 6 Mar 2023 08:28:55 +0100 Subject: [PATCH] [stable/train-only] Detect incorrect version of nova-libvirt container Detect if incorrect version of nova-libvirt container is used and prevent minor update if nova_libvirt 16.2.0-55.1638436404 is currently used. Minor update is blocked until manual steps are followed and an "updatable" libvirt version is installed. Resolves: rhbz#2119113 Change-Id: I35b0be844c73ae053388b9adbcb6e18552a3aa27 --- .../nova/nova-libvirt-container-puppet.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/deployment/nova/nova-libvirt-container-puppet.yaml b/deployment/nova/nova-libvirt-container-puppet.yaml index ffa763c30d..e75a57b9d6 100644 --- a/deployment/nova/nova-libvirt-container-puppet.yaml +++ b/deployment/nova/nova-libvirt-container-puppet.yaml @@ -936,4 +936,23 @@ outputs: network: {get_param: [ServiceNetMap, NovaLibvirtNetwork]} type: node - null + update_tasks: + block: + # To prevent minor update from 16.2.0 if nova_libvirt 16.2.0-55.1638436404 is present + # Resolves: rhbz#2119113 + - name: Get nova_libvirt container information + become: true + register: nova_libvirt_container_version + podman_container_info: + name: nova_libvirt + - name: Set fact for nova_libvirt container image version + set_fact: + nova_libvirt_version: "{{ nova_libvirt_container_version['containers'][0]['Config']['Image'] | default('') }}" + - name: Fail if affected nova-libvirt version is detected + fail: + msg: "nova-libvirt container is used as version 16.2.0-55.1638436404 which does not satisfy constraints. Please follow https://access.redhat.com/solutions/6969430 before procedding with compute updates." + when: '"16.2.0-55.1638436404" in nova_libvirt_version' + when: + - container_cli == 'podman' + - step|int == 0 upgrade_tasks: []