Skip to content

Commit

Permalink
tests: Enable LVM VDO tests on Fedora
Browse files Browse the repository at this point in the history
VDO is now available in Fedora and the kernel module (now named
"dm-vdo" instead of "kvdo") is now part of the upstream kernel.
  • Loading branch information
vojtechtrefny committed Nov 20, 2024
1 parent 1bc4cc8 commit 4cdc3b5
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions tests/tests_create_lvmvdo_then_remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,27 @@
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

- 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
Expand Down

0 comments on commit 4cdc3b5

Please sign in to comment.