parse_service_provider_opt affecting VPN UTs

Bug #1422895 reported by Paul Michali
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Doug Wiegley

Bug Description

For VPN functional tests or unit test that are run after stacking with DevStack, the tests are failing, indicating that the service driver is not unique.

It appears that parse_service_provider_opt() is loading the service driver based on what is in neutron_vpnaas.conf. Then, the tests are also loading the service driver and neutrons add_provider() is throwing an exception indicating that there is not a unique driver (which there now is not).

The work-around for unit tests, is to comment out the service_providers entry for VPN in neutron_vpnaas.conf, or remove the file. There is no work-around for the functional tests.

Tags: vpnaas
Revision history for this message
Paul Michali (pcm) wrote :
Download full text (4.8 KiB)

neutron_vpnaas.tests.unit.services.vpn.test_vpnaas_driver_plugin.TestVPNDriverPlugin.test_update_status
-------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
    _StringException: Empty attachments:
      pythonlogging:'neutron.api.extensions'
      stderr
      stdout

    pythonlogging:'': {{{
    2015-02-17 20:27:08,576 INFO [neutron.manager] Loading core plugin: neutron_vpnaas.tests.unit.db.vpn.test_db_vpnaas.TestVpnCorePlugin
    2015-02-17 20:27:08,577 INFO [neutron.manager] Service L3_ROUTER_NAT is supported by the core plugin
    2015-02-17 20:27:08,577 INFO [neutron.manager] Loading Plugin: neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin
    2015-02-17 20:27:08,578 ERROR [neutron.services.provider_configuration] Driver neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver is not unique across providers
    Traceback (most recent call last):
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/manager.py", line 133, in _get_plugin_instance
        mgr = driver.DriverManager(namespace, plugin_provider)
      File "/opt/stack/neutron-vpnaas/.tox/py27/local/lib/python2.7/site-packages/stevedore/driver.py", line 45, in __init__
        verify_requirements=verify_requirements,
      File "/opt/stack/neutron-vpnaas/.tox/py27/local/lib/python2.7/site-packages/stevedore/named.py", line 56, in __init__
        self._init_plugins(extensions)
      File "/opt/stack/neutron-vpnaas/.tox/py27/local/lib/python2.7/site-packages/stevedore/driver.py", line 97, in _init_plugins
        (self.namespace, name))
    RuntimeError: No 'neutron.service_plugins' driver found, looking for 'neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin'
    }}}

    Traceback (most recent call last):
      File "neutron_vpnaas/tests/unit/services/vpn/test_vpnaas_driver_plugin.py", line 47, in setUp
        vpnaas_plugin=VPN_DRIVER_CLASS)
      File "neutron_vpnaas/tests/unit/db/vpn/test_db_vpnaas.py", line 438, in setUp
        service_plugins=service_plugins
      File "neutron_vpnaas/tests/base.py", line 52, in setUp
        plugin, service_plugins, ext_mgr)
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/tests/unit/test_db_plugin.py", line 120, in setUp
        self.api = router.APIRouter()
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/api/v2/router.py", line 74, in __init__
        plugin = manager.NeutronManager.get_plugin()
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/manager.py", line 222, in get_plugin
        return weakref.proxy(cls.get_instance().plugin)
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/manager.py", line 216, in get_instance
        cls._create_instance()
      File "/opt/stack/neutron-vpnaas/.tox/py27/local/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 431, in inner
        return f(*args, **kwargs)
      File "/opt/stack/neutron-vpnaas/.tox/py27/src/neutron/neutron/manager.py", line 202, in _create_instance
        cls._instance = cls()
      File "/opt/stack/neutron-vpnaas...

Read more...

Changed in neutron:
assignee: nobody → Doug Wiegley (dougwig)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/157967
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fb3138c8d718be67505f247ca776abf15ba1504a
Submitter: Jenkins
Branch: master

commit fb3138c8d718be67505f247ca776abf15ba1504a
Author: Doug Wiegley <email address hidden>
Date: Fri Feb 20 14:54:03 2015 -0700

    If providers exist in neutron.conf, don't look in services conf

    Certain tests still put providers into neutron.conf, and upgrade scenarios
    will have more correct providers in neutron.conf than the new locations.
    If we find providers in neutron.conf, use them in favor of the
    split config files during the transition.

    Closes-Bug: 1422895
    Change-Id: I731f7c80c2df78fa521a5140e450972119f4a105

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
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.