From 8b9abfcc7e9151b0204ffa367fabac4d1be2204c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 22 Mar 2023 16:29:46 +0100 Subject: [PATCH] tests: force rpm pkg upgrade Due to a bug with the rpm version present in the current stream8 vagrant image, we have to make sure it is first upgraded to the latest version. (cherry picked from commit b87f214a96be5f834ba166014d54815d17ff6dd7) Signed-off-by: Guillaume Abrioux --- tests/functional/lvm_setup.yml | 15 +++++++++++++++ tests/functional/setup.yml | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/tests/functional/lvm_setup.yml b/tests/functional/lvm_setup.yml index 94149d96f..3808ce3f3 100644 --- a/tests/functional/lvm_setup.yml +++ b/tests/functional/lvm_setup.yml @@ -5,6 +5,21 @@ tasks: - import_tasks: ../../raw_install_python.yml + - name: check if it is Atomic host + stat: path=/run/ostree-booted + register: stat_ostree + check_mode: no + + - name: set fact for using Atomic host + set_fact: + is_atomic: '{{ stat_ostree.stat.exists }}' + + - name: force rpm pkg upgrade + package: + name: rpm + state: latest + when: not is_atomic | bool + - hosts: osds gather_facts: false become: yes diff --git a/tests/functional/setup.yml b/tests/functional/setup.yml index f8e2047d4..180b7fb35 100644 --- a/tests/functional/setup.yml +++ b/tests/functional/setup.yml @@ -13,6 +13,12 @@ set_fact: is_atomic: '{{ stat_ostree.stat.exists }}' + - name: force rpm pkg upgrade + package: + name: rpm + state: latest + when: not is_atomic | bool + - name: update the system command: dnf update -y changed_when: false