aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2022-02-24 17:00:56 +0100
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2022-03-01 16:59:33 +0000
commit8e8a499adc3ae0c4009bacde65cf3a141632ef3c (patch)
treeace2740e1d6023023b6ad39e784c01331776c785
parenta9278d54378bc9d9a18ffa7d70f2e25aafdc16a8 (diff)
downloadkolla-8e8a499adc3ae0c4009bacde65cf3a141632ef3c.tar.gz
kolla-8e8a499adc3ae0c4009bacde65cf3a141632ef3c.zip
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
-rw-r--r--docker/nova/nova-base/Dockerfile.j26
-rw-r--r--docker/octavia/octavia-base/Dockerfile.j26
-rw-r--r--docker/openstack-base/Dockerfile.j25
-rw-r--r--releasenotes/notes/distro-python-ovs-df705d1e59f16cde.yaml6
4 files changed, 21 insertions, 2 deletions
diff --git a/docker/nova/nova-base/Dockerfile.j2 b/docker/nova/nova-base/Dockerfile.j2
index 1771181a3..ca1fe10b9 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 7145de8b0..42a4dc011 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 2e60a1589..afc724214 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 000000000..0d22a0167
--- /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 <https://launchpad.net/bugs/1961874>`__