Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: VDO tests and packages fixes for Fedora and RHEL 10 #490

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions tests/tests_create_lvmvdo_then_remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,30 @@
ansible_facts.packages[blivet_pkg_name[0]][0]['version'] +
'-' + ansible_facts.packages[blivet_pkg_name[0]][0]['release'] }}"

- name: Set libblockdev package version
set_fact:
libblockdev_pkg_version: "{{
ansible_facts.packages['libblockdev'][0]['version'] +
'-' + ansible_facts.packages['libblockdev'][0]['release'] }}"

- name: Check if kvdo is loadable
shell: |
set -euo pipefail
modprobe --dry-run kvdo
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
command: modprobe --dry-run dm-vdo
ignore_errors: true # noqa ignore-errors
changed_when: false
register: __storage_dmvdo_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
- ansible_facts["distribution"] != "Fedora" or
libblockdev_pkg_version is version("3.1.1-2", ">=")
- __storage_kvdo_loadable is success or __storage_dmvdo_loadable is success
block:
- name: Get unused disks
include_tasks: get_unused_disk.yml
Expand Down
6 changes: 1 addition & 5 deletions vars/Fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ blivet_package_list:
# XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere
# else, it is already brought in as dependency of blivet so it's just no-op here
- "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}"
_storage_copr_packages:
- repository: "rhawalsh/dm-vdo"
packages:
- vdo
- kmod-vdo
- vdo
_storage_copr_support_packages:
- dnf-plugins-core
3 changes: 1 addition & 2 deletions vars/RedHat_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ blivet_package_list:
# XXX libblockdev-s390 is available only on s390 so just add 'libblockdev' everywhere
# else, it is already brought in as dependency of blivet so it's just no-op here
- "{{ 'libblockdev-s390' if ansible_architecture == 's390x' else 'libblockdev' }}"
# vdo not yet available on el10
# - vdo
- vdo
Loading