Use pre-provided libvirt-python

This is to satisfy both libvirtd compatibility and recent pip
sanity checks that started failing in DevStack jobs after [1],
impacting the main Masakari gate.

[1] https://review.opendev.org/c/openstack/devstack/+/802642

Change-Id: I448b9d2535bfaffa5a3bb77307baa0527a005144
This commit is contained in:
Radosław Piliszek 2021-08-17 18:50:24 +00:00
parent 5299d5fab4
commit 9a351efcec
4 changed files with 38 additions and 3 deletions

View File

@ -1,9 +1,17 @@
# This is a cross-platform list tracking distribution packages needed for install and tests;
# see https://docs.openstack.org/infra/bindep/ for additional information.
# Due to the nature of libvirt-python package, in DevStack we use the one
# provided in the distro alongside libvirtd - to ensure the two are compatible,
# and also to avoid the pip error when it tries to uninstall the distro version
# (installed in such a way for Nova in DevStack).
# Do note libvirt-python is used only for instance-oriented monitors, so, e.g.,
# it is not used by any host monitor.
# TODO(yoctozepto): Refactor code to not require libvirt-python for unit tests,
# basically following how it is handled in nova-compute and ceilometer-compute.
# libvirt-dev and pkg-config are required to compile libvirt-python package.
libvirt-dev [platform:dpkg]
pkg-config [platform:dpkg]
libvirt-dev [platform:dpkg test]
pkg-config [platform:dpkg test]
libxml2-dev [platform:dpkg test]
libxslt-devel [platform:rpm test]

View File

@ -0,0 +1,11 @@
---
other:
- |
*Note to packagers*: ``libvirt-python`` package is still required by
instance-oriented monitors. It is available in most distros as
``python3-libvirt``.
It is no longer listed in ``requirements.txt`` so it will not get
installed when installing ``masakari-monitors`` package from PyPI.
The change was done to follow how Nova handles this requirement.
This is to satisfy both libvirtd compatibility and recent pip
sanity checks.

View File

@ -4,7 +4,6 @@
automaton>=1.9.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
libvirt-python>=6.0.0 # LGPLv2+
openstacksdk>=0.13.0 # Apache-2.0
oslo.concurrency>=3.26.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
@ -17,3 +16,10 @@ oslo.privsep>=1.23.0 # Apache-2.0
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
# Due to the nature of libvirt-python package, in DevStack we use the one
# provided in the distro alongside libvirtd - to ensure the two are compatible,
# and also to avoid the pip error when it tries to uninstall the distro version
# (installed in such a way for Nova in DevStack).
# Do note libvirt-python is used only for instance-oriented monitors, so, e.g.,
# it is not used by any host monitor.

View File

@ -12,3 +12,13 @@ testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
ddt>=1.0.1 # MIT
# Due to the nature of libvirt-python package, in DevStack we use the one
# provided in the distro alongside libvirtd - to ensure the two are compatible,
# and also to avoid the pip error when it tries to uninstall the distro version
# (installed in such a way for Nova in DevStack).
# Do note libvirt-python is used only for instance-oriented monitors, so, e.g.,
# it is not used by any host monitor.
# TODO(yoctozepto): Refactor code to not require libvirt-python for unit tests,
# basically following how it is handled in nova-compute and ceilometer-compute.
libvirt-python>=6.0.0 # LGPLv2+