Skip to content

Commit 8b8a4c7

Browse files
committed
Remove libvirt-python from upper-constraints
... when installed from distribution. This is mostly to fix Ironic's gate as their ecosystem is too broad and complex to quickly remove libvirt-python from all possible requirements.txt More details inline. See also: https://review.opendev.org/c/openstack/devstack/+/798514 aka f0bf2bd Change-Id: Ic44daf15e952bbe3c424984ffb2474261e68008f
1 parent ebc7b0e commit 8b8a4c7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/nova_plugins/functions-libvirt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ EOF
5656

5757
# Installs required distro-specific libvirt packages.
5858
function install_libvirt {
59+
# NOTE(yoctozepto): The common consensus [1] is that libvirt-python should
60+
# be installed from distro packages. However, various projects might be
61+
# trying to ensure it is installed using pip AND use upper-constraints
62+
# with that, causing pip to try to upgrade it and to fail.
63+
# The following line removes libvirt-python from upper-constraints and
64+
# avoids the situation described above. Now only if installed packages
65+
# explicitly depend on a newer (or, in general, incompatible) libvirt-python
66+
# version, will pip try to reinstall it.
67+
# [1] https://review.opendev.org/c/openstack/devstack/+/798514
68+
$REQUIREMENTS_DIR/.venv/bin/edit-constraints \
69+
$REQUIREMENTS_DIR/upper-constraints.txt -- libvirt-python
5970

6071
if is_ubuntu; then
6172
install_package qemu-system libvirt-clients libvirt-daemon-system libvirt-dev python3-libvirt

0 commit comments

Comments
 (0)