← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1435216] Re: unit tests: KeyError: 'port_security' when building Debian package

 

Hi. The issue was the lack of PYTHONPATH=. when running ./run_tests.sh.
After this change, I got no unit test errors. Sorry for the noise, and
thanks for the help. I'm declaring this as invalid.

** Changed in: neutron
       Status: Confirmed => Invalid

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

Title:
  unit tests: KeyError: 'port_security' when building Debian package

Status in OpenStack Neutron (virtual network service):
  Invalid

Bug description:
  Hi there!

  I'm getting a bunch of  KeyError: 'port_security' when building
  Neutron Kilo b3 in Debian (see below). I'm cut/pasting only a single
  trace dump here, though there's about a dozen similar issues. Please
  help me to fix this. Note that the package is building under a Sbuild
  chroot, and the full build log may be found on my jenkins at:

  https://kilo-jessie.pkgs.mirantis.com/job/neutron/

  Cheers,

  Thomas Goirand (zigo)

  FAIL: neutron.tests.unit.ml2.test_ext_portsecurity.PSExtDriverTestCase.test_create_network_with_portsecurity_mac
  neutron.tests.unit.ml2.test_ext_portsecurity.PSExtDriverTestCase.test_create_network_with_portsecurity_mac
  ----------------------------------------------------------------------
  _StringException: Traceback (most recent call last):
  _StringException: Empty attachments:
    pythonlogging:'neutron.api.extensions'
    stderr
    stdout

  pythonlogging:'': {{{
  2015-03-23 08:47:57,618     INFO [neutron.manager] Loading core plugin: neutron.plugins.ml2.plugin.Ml2Plugin
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.managers] Configured type driver names: ['local', 'flat', 'vlan', 'gre', 'vxlan']
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_flat] Allowable flat physical_network names: []
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_vlan] Network VLAN ranges: {'physnet2': [(200, 300)], 'physnet1': [(1, 100)]}
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_local] ML2 LocalTypeDriver initialization complete
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.managers] Loaded type driver names: ['flat', 'vlan', 'gre', 'local', 'vxlan']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Registered types: ['flat', 'vlan', 'local', 'gre', 'vxlan']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Tenant network_types: ['local']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Configured extension driver names: ['port_security']
  }}}

  Traceback (most recent call last):
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ext_portsecurity.py", line 29, in setUp
      super(PSExtDriverTestCase, self).setUp()
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 118, in setUp
      self.setup_parent()
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 100, in setup_parent
      Ml2PluginConf.setUp(self, parent_setup)
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 80, in setUp
      parent_setup()
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_extension_portsecurity.py", line 171, in setUp
      super(PortSecurityDBTestCase, self).setUp(plugin)
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_extension_portsecurity.py", line 40, in setUp
      super(PortSecurityTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_db_plugin.py", line 120, in setUp
      self.api = router.APIRouter()
    File "/«PKGBUILDDIR»/neutron/api/v2/router.py", line 74, in __init__
      plugin = manager.NeutronManager.get_plugin()
    File "/«PKGBUILDDIR»/neutron/manager.py", line 222, in get_plugin
      return weakref.proxy(cls.get_instance().plugin)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 216, in get_instance
      cls._create_instance()
    File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
      return f(*args, **kwargs)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 202, in _create_instance
      cls._instance = cls()
    File "/«PKGBUILDDIR»/neutron/manager.py", line 117, in __init__
      plugin_provider)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 143, in _get_plugin_instance
      return plugin_class()
    File "/«PKGBUILDDIR»/neutron/plugins/ml2/plugin.py", line 128, in __init__
      self.extension_manager = managers.ExtensionManager()
    File "/«PKGBUILDDIR»/neutron/plugins/ml2/managers.py", line 704, in __init__
      name_order=True)
    File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 56, in __init__
      self._init_plugins(extensions)
    File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 112, in _init_plugins
      self.extensions = [self[n] for n in self._names]
    File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 283, in __getitem__
      return self._extensions_by_name[name]
  KeyError: 'port_security'

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

  pythonlogging:'': {{{
  2015-03-23 08:47:57,618     INFO [neutron.manager] Loading core plugin: neutron.plugins.ml2.plugin.Ml2Plugin
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.managers] Configured type driver names: ['local', 'flat', 'vlan', 'gre', 'vxlan']
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_flat] Allowable flat physical_network names: []
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_vlan] Network VLAN ranges: {'physnet2': [(200, 300)], 'physnet1': [(1, 100)]}
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.drivers.type_local] ML2 LocalTypeDriver initialization complete
  2015-03-23 08:47:57,619     INFO [neutron.plugins.ml2.managers] Loaded type driver names: ['flat', 'vlan', 'gre', 'local', 'vxlan']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Registered types: ['flat', 'vlan', 'local', 'gre', 'vxlan']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Tenant network_types: ['local']
  2015-03-23 08:47:57,620     INFO [neutron.plugins.ml2.managers] Configured extension driver names: ['port_security']
  }}}
     
  Traceback (most recent call last):
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ext_portsecurity.py", line 29, in setUp
      super(PSExtDriverTestCase, self).setUp()
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 118, in setUp
      self.setup_parent()
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 100, in setup_parent
      Ml2PluginConf.setUp(self, parent_setup)
    File "/«PKGBUILDDIR»/neutron/tests/unit/ml2/test_ml2_plugin.py", line 80, in setUp
      parent_setup()
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_extension_portsecurity.py", line 171, in setUp
      super(PortSecurityDBTestCase, self).setUp(plugin)
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_extension_portsecurity.py", line 40, in setUp
      super(PortSecurityTestCase, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
    File "/«PKGBUILDDIR»/neutron/tests/unit/test_db_plugin.py", line 120, in setUp
      self.api = router.APIRouter()
    File "/«PKGBUILDDIR»/neutron/api/v2/router.py", line 74, in __init__
      plugin = manager.NeutronManager.get_plugin()
    File "/«PKGBUILDDIR»/neutron/manager.py", line 222, in get_plugin
      return weakref.proxy(cls.get_instance().plugin)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 216, in get_instance
      cls._create_instance()
    File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 431, in inner
      return f(*args, **kwargs)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 202, in _create_instance
      cls._instance = cls()
    File "/«PKGBUILDDIR»/neutron/manager.py", line 117, in __init__
      plugin_provider)
    File "/«PKGBUILDDIR»/neutron/manager.py", line 143, in _get_plugin_instance
      return plugin_class()
    File "/«PKGBUILDDIR»/neutron/plugins/ml2/plugin.py", line 128, in __init__
      self.extension_manager = managers.ExtensionManager()
    File "/«PKGBUILDDIR»/neutron/plugins/ml2/managers.py", line 704, in __init__
      name_order=True)
    File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 56, in __init__
      self._init_plugins(extensions)
    File "/usr/lib/python2.7/dist-packages/stevedore/named.py", line 112, in _init_plugins
      self.extensions = [self[n] for n in self._names]
    File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 283, in __getitem__
      return self._extensions_by_name[name]
  KeyError: 'port_security'

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


References