unit test networking_bgpvpn.tests.unit.extensions.test_bgpvpn.BgpvpnExtensionTestCase.test_bgpvpn_list fails

Bug #1771107 reported by Thomas Morin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Committed
Undecided
Thomas Morin

Bug Description

A change in neutron results in a networking-bgpvpn unit test failure:

======================================================================
ERROR: networking_bgpvpn.tests.unit.extensions.test_bgpvpn.BgpvpnExtensionTestCase.test_bgpvpn_list
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/teom7365/prog/openstack/neutron/neutron/tests/base.py", line 140, in func
    return f(self, *args, **kwargs)
  File "networking_bgpvpn/tests/unit/extensions/test_bgpvpn.py", line 192, in test_bgpvpn_list
    _get_path(BGPVPN_URI, fmt=self.fmt))
  File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 331, in get
    expect_errors=expect_errors)
  File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 651, in do_request
    self._check_status(status, res)
  File "/home/teom7365/prog/openstack/networking-bgpvpn/.tox/py27/local/lib/python2.7/site-packages/webtest/app.py", line 683, in _check_status
    res)
webtest.app.AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for http://localhost/bgpvpn/bgpvpns.json)
'{"NeutronError": {"message": "Extensions not found: [\'bgpvpn\'].", "type": "ExtensionsNotFound", "detail": ""}}'

'git bisect' allows to identify the neutron commit which introduces the issue:

   https://review.openstack.org/#/c/545490/

At this point, I don't have identified /why/ this commit causes this failure.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

I don't have a full analysis yet, but the part of [1] that causes the breakage is more precisely the fact that the extensions.PluginAwareExtensionManager singleton instance is created at a different time than previously [2], and, in the context of the failing unit test, at a time when the extension path does not include the path to the directory containing the bgpvpn.py extension.

[1] https://review.openstack.org/#/c/545490/
[2] https://review.openstack.org/#/c/545490/19/neutron/api/api_common.py lines 78 -> 98

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bgpvpn (master)

Fix proposed to branch: master
Review: https://review.openstack.org/568322

Changed in bgpvpn:
assignee: nobody → Thomas Morin (tmmorin-orange)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bgpvpn (master)

Reviewed: https://review.openstack.org/568322
Committed: https://git.openstack.org/cgit/openstack/networking-bgpvpn/commit/?id=4481c5279717e4ff955fb89f4e3ea9b57bce95f5
Submitter: Zuul
Branch: master

commit 4481c5279717e4ff955fb89f4e3ea9b57bce95f5
Author: Thomas Morin <email address hidden>
Date: Mon May 14 17:54:20 2018 +0200

    unit test fix: fix api_extension_path being overriden

    For some reason I don't understand, api_extension_path ends up
    being rewritten between two unit tests.

    This is a workaround to unbreak CI.

    Change-Id: I930343e7c5d63c02a75bca284be30d5a3df05791
    Partial-Bug: 1771107

Gary Kotton (garyk)
no longer affects: neutron
Changed in bgpvpn:
status: In Progress → Fix Committed
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.