Skip to content

Commit f0bf2bd

Browse files
committed
libvirt: Stop installing python bindings from pip
As set out in bug #1933096 these bindings are dynamically built against the version of libvirt present in the environment at build time. As a result using a pre-built wheel can cause AttributeError's when the bindings have previously been built elsewhere against an older version of libvirt installed on the host. This is currently the case in CentOS 8 stream based CI jobs where we try to use 7.4.0 bindings that appear to be built against libvirt <= 6.10 leading to bug #1933096. This change seeks to avoid this by installing the bindings from packages that will always be built against the correct corresponding version of libvirt. Change-Id: I76184c17a776c4e1ecaab9549d9d36c8c07c60fa Closes-Bug: #1933096
1 parent 94d7cac commit f0bf2bd

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/nova_plugins/functions-libvirt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@ EOF
5858
function install_libvirt {
5959

6060
if is_ubuntu; then
61-
install_package qemu-system libvirt-clients libvirt-daemon-system libvirt-dev
61+
install_package qemu-system libvirt-clients libvirt-daemon-system libvirt-dev python3-libvirt
6262
if is_arch "aarch64"; then
6363
install_package qemu-efi
6464
fi
65-
# uninstall in case the libvirt version changed
66-
pip_uninstall libvirt-python
67-
pip_install_gr libvirt-python
6865
#pip_install_gr <there-si-no-guestfs-in-pypi>
6966
elif is_fedora || is_suse; then
7067

@@ -79,14 +76,11 @@ function install_libvirt {
7976
# as the base system version is too old. We should have
8077
# pre-installed these
8178
install_package qemu-kvm
79+
install_package libvirt libvirt-devel python3-libvirt
8280

83-
install_package libvirt libvirt-devel
8481
if is_arch "aarch64"; then
8582
install_package edk2.git-aarch64
8683
fi
87-
88-
pip_uninstall libvirt-python
89-
pip_install_gr libvirt-python
9084
fi
9185

9286
if [[ $DEBUG_LIBVIRT_COREDUMPS == True ]]; then

0 commit comments

Comments
 (0)