From 4cdc3b534bb69fc14c2ffa934829d876549f6255 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 20 Nov 2024 12:36:30 +0100 Subject: [PATCH] tests: Enable LVM VDO tests on Fedora VDO is now available in Fedora and the kernel module (now named "dm-vdo" instead of "kvdo") is now part of the upstream kernel. --- tests/tests_create_lvmvdo_then_remove.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/tests_create_lvmvdo_then_remove.yml b/tests/tests_create_lvmvdo_then_remove.yml index 06d3662b..5211e568 100644 --- a/tests/tests_create_lvmvdo_then_remove.yml +++ b/tests/tests_create_lvmvdo_then_remove.yml @@ -40,10 +40,20 @@ ansible_facts.packages[blivet_pkg_name[0]][0]['version'] + '-' + ansible_facts.packages[blivet_pkg_name[0]][0]['release'] }}" - - name: Check if kvdo is loadable - shell: | - set -euo pipefail - modprobe --dry-run kvdo + - name: Check if kvdo is loadable (RHEL 8 and 9) + when: + - ansible_facts["os_family"] == "RedHat" + - ansible_facts["distribution_major_version"] | int < 10 + command: modprobe --dry-run kvdo + ignore_errors: true # noqa ignore-errors + changed_when: false + register: __storage_kvdo_loadable + + - name: Check if dm-vdo is loadable (RHEL 10 and Fedora) + when: (ansible_facts["os_family"] == "RedHat" and + ansible_facts["distribution_major_version"] | int == 10) or + ansible_facts["os_family"] == "Fedora" + command: modprobe --dry-run dm-vdo ignore_errors: true # noqa ignore-errors changed_when: false register: __storage_kvdo_loadable @@ -51,7 +61,6 @@ - name: Run tests if VDO is available when: - blivet_pkg_version is version("3.2.2-10", ">=") - - ansible_facts["distribution"] != "Fedora" - __storage_kvdo_loadable is success block: - name: Get unused disks