From 14f3cd2c326dfcbfa78f21d75b69093435468ef0 Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Wed, 4 Dec 2019 12:07:41 +0530 Subject: Added python3 packages for mellanox agent container https://review.opendev.org/#/c/672023 added mellanox agent container which contains python2 packages but on RHEL8 tripleo job, python3 packages are needed which broke the periodic container build job, including python3 packages will fix the issue. Closes-Bug: #1855050 Change-Id: I35909eccaa101ef498d0a3481b8708d8ee5884d3 Signed-off-by: Chandan Kumar (raukadah) --- docker/neutron/neutron-mlnx-agent/Dockerfile.j2 | 31 ++++++++++++++----------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'docker') diff --git a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 index 7bb7adfaa..0158bba01 100644 --- a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 @@ -5,37 +5,40 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{% if base_package_type == 'rpm' %} - +{% if distro_python_version.startswith('3') %} {% set neutron_mlnx_agent_packages = [ - 'libvirt-python', - 'python-ethtool', + 'python3-libvirt', + 'python3-ethtool', ] %} - -{% elif base_package_type == 'deb' %} - +{% else %} {% set neutron_mlnx_agent_packages = [ - 'python-libvirt', + 'libvirt-python', 'python-ethtool', ] %} - {% endif %} {% if install_type == 'binary' %} - {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ - 'python-networking-mlnx' - ] %} + {% if distro_python_version.startswith('3') %} + {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ + 'python3-networking-mlnx' + ] %} + {% else %} + {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [ + 'python-networking-mlnx' + ] %} + {% endif %} + +{% endif %} {{ macros.install_packages(neutron_mlnx_agent_packages | customizable("packages")) }} -{% elif install_type == 'source' %} +{% if install_type == 'source' %} {% set neutron_mlnx_agent_pip_packages = [ 'networking-mlnx' ] %} -{{ macros.install_packages(neutron_mlnx_agent_packages | customizable("packages")) }} RUN {{ macros.install_pip(neutron_mlnx_agent_pip_packages | customizable("pip_packages")) }} {% endif %} -- cgit v1.2.3