Use libvirt-python from the distribution on Red Hat systems

The one in PyPI can easily get out of sync, causing breakages.
Since Red Hat systems move pretty quickly, just use the system
package (Bifrost creates the venv with system site packages).

Change-Id: I08da25aa73cdf3dc43886bc746431f6082e804a1
This commit is contained in:
Dmitry Tantsur 2022-05-18 09:55:36 +02:00
parent 901d587f88
commit 8fa29d9834
4 changed files with 20 additions and 8 deletions

View File

@ -19,7 +19,6 @@ required_packages:
- libvirt-daemon-driver-secret - libvirt-daemon-driver-secret
- libvirt-daemon-driver-storage - libvirt-daemon-driver-storage
- libvirt-daemon-kvm - libvirt-daemon-kvm
- pkgconfig - python3-libvirt
- libvirt-devel
- edk2-ovmf - edk2-ovmf
test_vm_emulator: "/usr/libexec/qemu-kvm" test_vm_emulator: "/usr/libexec/qemu-kvm"

View File

@ -9,7 +9,6 @@ required_packages:
- libvirt - libvirt
- libvirt-client - libvirt-client
- libvirt-daemon - libvirt-daemon
- pkgconfig - python3-libvirt
- libvirt-devel
- python3-libselinux - python3-libselinux
- edk2-ovmf - edk2-ovmf

View File

@ -12,8 +12,7 @@ required_packages:
- libvirt - libvirt
- libvirt-client - libvirt-client
- libvirt-daemon - libvirt-daemon
- pkgconfig - python3-libvirt
- libvirt-devel
- libxslt-devel - libxslt-devel
- libxml2-devel - libxml2-devel
- edk2-ovmf - edk2-ovmf

View File

@ -22,16 +22,22 @@
- default_boot_mode != 'uefi' - default_boot_mode != 'uefi'
- test_vm_secure_boot | bool - test_vm_secure_boot | bool
- name: install libvirt-python, gunicorn and lxml - name: install gunicorn and lxml
include_role: include_role:
name: bifrost-pip-install name: bifrost-pip-install
vars: vars:
package: "{{ item }}" package: "{{ item }}"
loop: loop:
- libvirt-python
- gunicorn - gunicorn
- lxml - lxml
- name: install libvirt-python if needed
include_role:
name: bifrost-pip-install
vars:
package: libvirt-python
when: ansible_os_family != 'RedHat'
- name: configure libvirt log filters for qemu - name: configure libvirt log filters for qemu
blockinfile: blockinfile:
path: /etc/libvirt/libvirtd.conf path: /etc/libvirt/libvirtd.conf
@ -161,6 +167,15 @@
path: "{{ test_vm_logdir | dirname }}" path: "{{ test_vm_logdir | dirname }}"
mode: "0755" mode: "0755"
# NOTE(dtantsur): pypi version can easily get out of sync, we need to use
# the version from the distribution.
- name: edit libvirt-python out of upper constraints
lineinfile:
path: "{{ upper_constraints_file }}"
regexp: "^libvirt\\-python"
state: absent
when: ansible_os_family == 'RedHat'
- name: install virtualbmc - name: install virtualbmc
include_role: include_role:
name: bifrost-pip-install name: bifrost-pip-install