openvswitch-netcontrold needs to be migrated to virtualenv

Bug #2027668 reported by Marcin Juszkiewicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Unassigned

Bug Description

openvswitch-netcontrold image tries to install Python package into system directories. In Debian 12 'bookworm' it is forbidden way.

Image needs to be changed to use virtualenv and install package there.

Build log:

INFO:kolla.common.utils.openvswitch-netcontrold:Step 1/5 : FROM book2m/openvswitch-base:debian
INFO:kolla.common.utils.openvswitch-netcontrold: ---> be60c6b3abf2
INFO:kolla.common.utils.openvswitch-netcontrold:Step 2/5 : LABEL maintainer="Kolla Project (https://launchpad.net/kolla)" name="openvswitch-netcontrold" build-date="20230622"
INFO:kolla.common.utils.openvswitch-netcontrold: ---> Running in 4fce0143fd5b
INFO:kolla.common.utils.openvswitch-netcontrold:Removing intermediate container 4fce0143fd5b
INFO:kolla.common.utils.openvswitch-netcontrold: ---> dc9f80026b75
INFO:kolla.common.utils.openvswitch-netcontrold:Step 3/5 : RUN SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip --no-cache-dir install --upgrade pip wheel setuptools && SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip --no-cache-dir install --upgrade netcontrold
INFO:kolla.common.utils.openvswitch-netcontrold: ---> Running in 78cbd80062d1
INFO:kolla.common.utils.openvswitch-netcontrold:.[91merror: externally-managed-environment
INFO:kolla.common.utils.openvswitch-netcontrold:× This environment is externally managed
INFO:kolla.common.utils.openvswitch-netcontrold:╰─> To install Python packages system-wide, try apt install
INFO:kolla.common.utils.openvswitch-netcontrold: python3-xyz, where xyz is the package you are trying to
INFO:kolla.common.utils.openvswitch-netcontrold: install.
INFO:kolla.common.utils.openvswitch-netcontrold:
INFO:kolla.common.utils.openvswitch-netcontrold: If you wish to install a non-Debian-packaged Python package,
INFO:kolla.common.utils.openvswitch-netcontrold: create a virtual environment using python3 -m venv path/to/venv.
INFO:kolla.common.utils.openvswitch-netcontrold: Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
INFO:kolla.common.utils.openvswitch-netcontrold: sure you have python3-full installed.
INFO:kolla.common.utils.openvswitch-netcontrold:
INFO:kolla.common.utils.openvswitch-netcontrold: If you wish to install a non-Debian packaged Python application,
INFO:kolla.common.utils.openvswitch-netcontrold: it may be easiest to use pipx install xyz, which will manage a
INFO:kolla.common.utils.openvswitch-netcontrold: virtual environment for you. Make sure you have pipx installed.
INFO:kolla.common.utils.openvswitch-netcontrold:
INFO:kolla.common.utils.openvswitch-netcontrold: See /usr/share/doc/python3.11/README.venv for more information.
INFO:kolla.common.utils.openvswitch-netcontrold:note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
INFO:kolla.common.utils.openvswitch-netcontrold:hint: See PEP 668 for the detailed specification.
INFO:kolla.common.utils.openvswitch-netcontrold:.[0m
INFO:kolla.common.utils.openvswitch-netcontrold:Removing intermediate container 78cbd80062d1
ERROR:kolla.common.utils.openvswitch-netcontrold:Error'd with the following message
ERROR:kolla.common.utils.openvswitch-netcontrold:The command '/bin/sh -c SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip --no-cache-dir install --upgrade pip wheel setuptools && SETUPTOOLS_USE_DISTUTILS=stdlib python3 -m pip --no-cache-dir install --upgrade netcontrold' returned a non-zero code: 1

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Reason:

python-pip (23.0+dfsg-2) unstable; urgency=medium

  This version of pip introduces PEP 668 support. Debian's python3.11
  interpreter will soon (>= 3.11.2-3) declare the installation to be
  EXTERNALLY-MANAGED, instructing pip to disallow package installation outside
  virtualenvs.

  See: https://peps.python.org/pep-0668/

  Practically, this means that you can't use pip to install packages outside a
  virtualenv, on Debian's Python interpreter by default, any more.

  You can override this behaviour by passing --break-system-packages to pip
  install, but be aware that if you are running pip as root, doing so can
  break your system.

  See /usr/share/doc/python3.11/README.venv for more details.

 -- Stefano Rivera <email address hidden> Sun, 05 Feb 2023 13:01:43 -0400

Changed in kolla:
status: New → Triaged
Changed in kolla:
status: Triaged → In Progress
Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/kolla/+/891655

Changed in kolla:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.opendev.org/c/openstack/kolla/+/891655
Committed: https://opendev.org/openstack/kolla/commit/dbc9b1193e4361bbab3742970ea268b5a419c911
Submitter: "Zuul (22348)"
Branch: master

commit dbc9b1193e4361bbab3742970ea268b5a419c911
Author: Michal Nasiadka <email address hidden>
Date: Thu Aug 17 09:08:30 2023 +0200

    Drop openvswitch-netcontrold

    Closes-Bug: #2027668

    Change-Id: Ib8cd2356c6e4cdf7b2108a7fdedcb5a4b02768ca

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 17.0.0.0rc1

This issue was fixed in the openstack/kolla 17.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.