Queens neutron broken with recent L3 removal from neutron-lib.constants

Bug #1780376 reported by Michael Johnson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Global Requirements
Fix Released
Undecided
Matthew Thode
neutron
Invalid
Undecided
Unassigned

Bug Description

This patch: https://github.com/openstack/neutron-lib/commit/ec829f9384547864aebb56390da8e17df7051aac breaks neutron in the current global requirements setup. Current GR with the new versioning pulls queens neutron and the 1.17.0 neutron-lib. Since L3 was removed from neutron-lib.constants, queens neutron fails on the reference neutron/plugins/common/constants.py

I'm not sure if L3 should be put back, queens neutron patched, or the global requirements setup where it's pulling different versions of neutron and neutron-lib needs to be fixed.

Steps to reproduce:
Checkout neutron-lbaas and run tox -e py27
Zuul seems to be pulling the right versions, local does not due to the GR constraints.

Failed to import test module: neutron_lbaas.tests.unit.agent.test_agent
Traceback (most recent call last):
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "neutron_lbaas/tests/unit/agent/test_agent.py", line 19, in <module>
    from neutron_lbaas.agent import agent
  File "neutron_lbaas/agent/agent.py", line 26, in <module>
    from neutron_lbaas.agent import agent_manager as manager
  File "neutron_lbaas/agent/agent_manager.py", line 17, in <module>
    from neutron.agent import rpc as agent_rpc
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/agent/rpc.py", line 27, in <module>
    from neutron.agent import resource_cache
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/agent/resource_cache.py", line 20, in <module>
    from neutron.api.rpc.callbacks.consumer import registry as registry_rpc
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/api/rpc/callbacks/consumer/registry.py", line 15, in <module>
    from neutron.api.rpc.callbacks import resource_manager
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/api/rpc/callbacks/resource_manager.py", line 21, in <module>
    from neutron.api.rpc.callbacks import resources
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/api/rpc/callbacks/resources.py", line 15, in <module>
    from neutron.objects import network
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/objects/network.py", line 21, in <module>
    from neutron.db.models import segment as segment_model
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/db/models/segment.py", line 24, in <module>
    from neutron.extensions import segment
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/extensions/segment.py", line 26, in <module>
    from neutron.api import extensions
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/api/extensions.py", line 32, in <module>
    from neutron.plugins.common import constants as const
  File "/home/michjohn/projects/migration/neutron-lbaas/.tox/py27/local/lib/python2.7/site-packages/neutron/plugins/common/constants.py", line 28, in <module>
    'router': constants.L3,
AttributeError: 'module' object has no attribute 'L3'

Revision history for this message
zhaobo (zhaobo6) wrote :

Hi Michael, the 'L3' is the service plugin name, I saw the neutron-lib version 1.17.0, it is in the right place now, which is neutron_lib.plugin.constants. So in current state, if queen neutron want to use neutron-lib, the latest version it can used is 1.16.0 . Let me raise it in neutron how to fix it.

Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
tags: added: needs-attention
Revision history for this message
Boden R (boden) wrote :

This appears to be a problem with neutron-lbaas tox setup for stable/queens when running locally as outlined in [1].

As shown in recent lbaas stable/queens patches (running in zuul/gate) such as [2]; things run fine with zuul/gate and properly use neutron-lib 1.13.0 [3] and neutron stable/queens [4].

However if you run tox targets locally, neutron master is installed (not neutron stable/queens) and thus neutron-lib 1.16.0 (or whatever neutron master depends on) is pulled in. This is strictly a problem with neutron-lbaas tox setup for local targets [1].

That said I don't think anything is broken with neutron or neutron-lib, but rather the lbaas tox needs to be updated as per [1] for both master and queens branches.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-June/131801.html
[2] https://review.openstack.org/#/c/580574/
[3] http://logs.openstack.org/74/580574/1/check/openstack-tox-py27/96fde02/job-output.txt.gz#_2018-07-06_07_57_59_059571
[4] http://logs.openstack.org/74/580574/1/check/openstack-tox-py27/96fde02/zuul-info/inventory.yaml

Revision history for this message
Michael Johnson (johnsom) wrote :

This issue only applies to master where qa/infra has removed zuul cloner and is now relying on requirements/upper-contraints.

So from Boden's comments it sounds like this is a broken requirements/upper-constraint for neutron/neutron-lib.

I will add the requirements team to the bug.

Revision history for this message
Matthew Thode (prometheanfire) wrote :

we reverted iirc

Changed in openstack-requirements:
status: New → Fix Released
assignee: nobody → Matthew Thode (prometheanfire)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

There is nothing to do in neutron side. If neutron-lbaas tox job pulls neutron and neutron-lib properly with upper-constraints.txt from the stable/queens branch, the issue has gone.

I created a fresh neutron-lbaas tox py27 env (using stable/queens commit ed663f36b0a14202fdff8132c0dd3d353cef6aff) and confirmed the expected version of neutron and neutron-lib are installed. neutron is installed from the latest stable/queens branch and neutron-lib 1.13.0 is the latest queens version.

$ .tox/py27/bin/pip freeze | grep neutron
-e git+https://git.openstack.org/openstack/neutron@bffdbfe20e47d6f27cea8d26121e2c1eccba7e9f#egg=neutron
-e git+https://git.openstack.org//openstack/neutron-lbaas@ed663f36b0a14202fdff8132c0dd3d353cef6aff#egg=neutron_lbaas
neutron-lib==1.13.0
python-neutronclient==6.7.0

Changed in neutron:
status: Confirmed → Invalid
importance: Medium → Undecided
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.