← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2092403] Re: With latest pyroute2 periodic jobs fails with ImportError: cannot import name 'nslink' from 'pyroute2.nslink'

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/938205
Committed: https://opendev.org/openstack/neutron/commit/a230c6fe77be569785794294a82e4785933c72d5
Submitter: "Zuul (22348)"
Branch:    master

commit a230c6fe77be569785794294a82e4785933c72d5
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date:   Mon Dec 23 14:20:09 2024 +0000

    Import NetNS from pyroute2
    
    Since [1] (pyroute2>0.8.1), the class NetNS should be imported
    from pyroute2 module.
    Also remove usage of pyroute2.ipdb which also got removed.
    
    [1]https://github.com/svinota/pyroute2/commit/8b81ddffe61d11ed4e5b79c303d687ac9083563a
    
    Closes-Bug: #2092403
    Change-Id: I92bf48cc616c0b2dadec4b74175338b3e9a3a6fe


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2092403

Title:
  With latest pyroute2 periodic jobs fails with ImportError: cannot
  import name 'nslink' from 'pyroute2.nslink'

Status in neutron:
  Fix Released

Bug description:
  with latest pyroute2 i.e including https://github.com/svinota/pyroute2/commit/8b81ddffe61d11ed4e5b79c303d687ac9083563a periodic jobs running with pyroute2 master branch started failing as:-
  2024-12-23 02:34:12.628917 | controller | Failed to import test module: neutron.tests.functional.tests.common.exclusive_resources.test_resource_allocator
  2024-12-23 02:34:12.628923 | controller | Traceback (most recent call last):
  2024-12-23 02:34:12.628929 | controller |   File "/usr/lib/python3.12/unittest/loader.py", line 394, in _find_test_path
  2024-12-23 02:34:12.628934 | controller |     module = self._get_module_from_name(name)
  2024-12-23 02:34:12.628940 | controller |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2024-12-23 02:34:12.628945 | controller |   File "/usr/lib/python3.12/unittest/loader.py", line 337, in _get_module_from_name
  2024-12-23 02:34:12.628955 | controller |     __import__(name)
  2024-12-23 02:34:12.628965 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/functional/tests/common/exclusive_resources/test_resource_allocator.py", line 21, in <module>
  2024-12-23 02:34:12.698088 | controller |     from neutron.tests.functional import base
  2024-12-23 02:34:12.698162 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/functional/base.py", line 51, in <module>
  2024-12-23 02:34:12.698177 | controller |     from neutron.tests import base
  2024-12-23 02:34:12.698187 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 51, in <module>
  2024-12-23 02:34:12.698197 | controller |     from neutron.agent.linux import external_process
  2024-12-23 02:34:12.698207 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/agent/linux/external_process.py", line 26, in <module>
  2024-12-23 02:34:12.698217 | controller |     from neutron.agent.linux import ip_lib
  2024-12-23 02:34:12.698226 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/agent/linux/ip_lib.py", line 40, in <module>
  2024-12-23 02:34:12.698236 | controller |     from neutron.privileged.agent.linux import ip_lib as privileged
  2024-12-23 02:34:12.698264 | controller |   File "/home/zuul/src/opendev.org/openstack/neutron/neutron/privileged/agent/linux/ip_lib.py", line 26, in <module>
  2024-12-23 02:34:12.698275 | controller |     from pyroute2.nslink import nslink
  2024-12-23 02:34:12.698285 | controller | ImportError: cannot import name 'nslink' from 'pyroute2.nslink' (/home/zuul/src/opendev.org/openstack/neutron/.tox/dsvm-functional-gate/lib/python3.12/site-packages/pyroute2/nslink/__init__.py). Did you mean: 'netlink'?

  Example failure:
  https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_d88/periodic/opendev.org/openstack/neutron/master/neutron-
  functional-with-pyroute2-master/d887aa8/job-output.txt

  Builds:- https://zuul.openstack.org/builds?job_name=neutron-fullstack-
  with-pyroute2-master&job_name=neutron-functional-with-
  pyroute2-master&project=openstack%2Fneutron&skip=0

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2092403/+subscriptions



References