From 8e8a499adc3ae0c4009bacde65cf3a141632ef3c Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 24 Feb 2022 17:00:56 +0100 Subject: [PATCH] Use python3-openvswitch from distro We should use the same Python OVS bindings package version as running OpenvSwitch. See related bug. Closes-Bug: #1961874 Change-Id: Id6968e3ec1093f26f25f3045e2a6d8cc4f41adaa --- docker/nova/nova-base/Dockerfile.j2 | 6 ++++-- docker/octavia/octavia-base/Dockerfile.j2 | 6 ++++++ docker/openstack-base/Dockerfile.j2 | 5 +++++ releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2 index 1771181a31..ca1fe10b96 100644 --- a/docker/nova/nova-base/Dockerfile.j2 +++ b/docker/nova/nova-base/Dockerfile.j2 @@ -53,7 +53,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% if base_package_type == 'rpm' %} {% set nova_base_packages = [ - 'openvswitch' + 'openvswitch', + 'python3-openvswitch' ] %} {% if base_arch == 'x86_64' %} {% set nova_base_packages = nova_base_packages + [ @@ -74,7 +75,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'iptables', 'openssh-client', 'openvswitch-switch', - 'python3-libvirt' + 'python3-libvirt', + 'python3-openvswitch' ] %} {% if base_arch == 'x86_64' %} {% set nova_base_packages = nova_base_packages + [ diff --git a/docker/octavia/octavia-base/Dockerfile.j2 b/docker/octavia/octavia-base/Dockerfile.j2 index 7145de8b0b..42a4dc0119 100644 --- a/docker/octavia/octavia-base/Dockerfile.j2 +++ b/docker/octavia/octavia-base/Dockerfile.j2 @@ -24,6 +24,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {{ macros.install_packages(octavia_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} + {% set octavia_base_packages = [ + 'python3-openvswitch' + ] %} + +{{ macros.install_packages(octavia_base_packages | customizable("packages")) }} + ADD octavia-base-archive /octavia-base-source {% set octavia_base_pip_packages = [ diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 2e60a15893..afc724214c 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -317,6 +317,11 @@ ENV DEBIAN_FRONTEND noninteractive ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ +{# NOTE(mnasiadka): Remove ovs from upper-constraints.txt because python3-openvswitch + is usually newer than UC entry and older version would get installed + in venv (see https://launchpad.net/bugs/1961874). +#} + && sed -i /^ovs=/d /requirements/upper-constraints.txt \ && mkdir -p /var/lib/kolla \ && {{ macros.install_pip(['virtualenv'])}} \ && virtualenv --system-site-packages /var/lib/kolla/venv diff --git a/releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml b/releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml new file mode 100644 index 0000000000..0d22a0167a --- /dev/null +++ b/releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue when older version of Python OpenvSwitch bindings package + was used, than the running OpenvSwitch code. + `LP#1961874 `__