[stable/ussuri] Functional job fails - AttributeError: module 'neutron_lib.constants' has no attribute 'DEVICE_OWNER_DISTRIBUTED'

Bug #1903689 reported by Bernard Cafarelli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
Undecided
Unassigned
networking-sfc
Fix Released
Undecided
Unassigned
neutron
Fix Released
Medium
Bernard Cafarelli

Bug Description

Spotted with this review:
https://review.opendev.org/#/c/748135/
https://zuul.opendev.org/t/openstack/build/cc5ece62f011441cad5c82926eba1466

Functional job now fails 100% on stable/ussuri:
=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: networking_sfc.tests.functional.db.test_migrations
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/networking_sfc/tests/functional/db/test_migrations.py", line 17, in <module>
    from neutron.tests.functional.db import test_migrations
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/tests/functional/db/test_migrations.py", line 33, in <module>
    from neutron.db.migration.models import head as head_models
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/db/migration/models/head.py", line 31, in <module>
    from neutron.db import l3_dvrscheduler_db # noqa
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/db/l3_dvrscheduler_db.py", line 34, in <module>
    from neutron.db import l3_dvr_db
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/db/l3_dvr_db.py", line 45, in <module>
    from neutron.db import l3_db
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/db/l3_db.py", line 56, in <module>
    from neutron.objects import ports as port_obj
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/objects/ports.py", line 23, in <module>
    from neutron.common import _constants
  File "/home/zuul/src/opendev.org/openstack/networking-sfc/.tox/dsvm-functional/lib/python3.6/site-packages/neutron/common/_constants.py", line 79, in <module>
    constants.DEVICE_OWNER_DISTRIBUTED]
AttributeError: module 'neutron_lib.constants' has no attribute 'DEVICE_OWNER_DISTRIBUTED'
[...]

Possible fix, capping neutron-lib for this branch?

neutron-fwaas has similar issue:
https://review.opendev.org/#/c/752882/
https://zuul.opendev.org/t/openstack/build/7fdfc3ab0f0a458ea296d25444d895b1

Tags: gate-failure
Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

Added neutron as affected project to track neutron-fwaas part

Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

openstack-tox-py38 job for networking-bgpvpn stable/ussuri shows similar error:
https://review.opendev.org/#/c/743487
https://zuul.opendev.org/t/openstack/build/8628803415a34b6e84fa3635eda6946b

Revision history for this message
Elod Illes (elod-illes) wrote :

I think the root cause is that neutron-lib is constrained in ussuri (neutron-lib==2.3.0), but neutron is not (neutron==17.0.0) [1]. The new constant was introduced with patch I0a69f1bddaa7030c7287216e62ec1ac6dd381475 in victoria.

If I'm not mistaken there should be some automation that sets upper-constraint for some packages, e.g. neutron, but it missed to cap it in ussuri (and victoria?). An example for that patch is this one: I6c35d75dafb144a3723c3735373a76e3a674c7ff

[1] https://zuul.opendev.org/t/openstack/build/8628803415a34b6e84fa3635eda6946b/log/job-output.txt#638

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

Interesting, maybe automation only kicks in to update existing entries? Though I am not sure why from ussuri we do not have neutron in that list (maybe because of the siblings sytem?)

Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

OK, I found some relevant commit in requirements for stein, commit 6b67b6406c939df2bf706b6525ec123546a73b3e

    Add neutron to stable upper-constraints

    Some projects, notably neutron plugins, are using the neutron service as
    a library. There is the neutron-lib package, but apparently they have
    not moved everything needed over to there yet.

    This is being added directly in stable branches only. Master needs to
    get the latest version available, so these will need to be added at each
    release so the stable branches use the correct version of neutron for
    their respective stable release.

So it looks like we did not apply this step in branch creation for train and newer, I will send patches

Changed in neutron:
status: New → In Progress
assignee: nobody → Bernard Cafarelli (bcafarel)
Revision history for this message
Bernard Cafarelli (bcafarel) wrote :
Revision history for this message
Bernard Cafarelli (bcafarel) wrote :

ussuri just merged, marking this fixed

Changed in neutron:
status: In Progress → Fix Released
Changed in bgpvpn:
status: New → Fix Released
Changed in networking-sfc:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements ussuri-eol

This issue was fixed in the openstack/requirements ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements victoria-eom

This issue was fixed in the openstack/requirements victoria-eom release.

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.