← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1625973] [NEW] RuntimeError: Model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.MyModel'> tried to register for API resource my_resource which conflicts with model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.Dup'>.

 

Public bug reported:

http://logs.openstack.org/52/372552/7/check/gate-neutron-
python34/e7b00a0/testr_results.html.gz

Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/extensions/test_address_scope.py", line 132, in setUp
    super(TestAddressScope, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/db/test_db_base_plugin_v2.py", line 133, in setUp
    self.api = router.APIRouter()
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/api/v2/router.py", line 76, in __init__
    plugin = manager.NeutronManager.get_plugin()
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 244, in get_plugin
    return weakref.proxy(cls.get_instance().plugin)
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 238, in get_instance
    cls._create_instance()
  File "/home/jenkins/workspace/gate-neutron-python34/.tox/py34/lib/python3.4/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
    return f(*args, **kwargs)
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 224, in _create_instance
    cls._instance = cls()
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 126, in __init__
    plugin_provider)
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 160, in _get_plugin_instance
    return plugin_class()
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/db/standardattrdescription_db.py", line 28, in __new__
    for resource in standard_attr.get_standard_attr_resource_model_map():
  File "/home/jenkins/workspace/gate-neutron-python34/neutron/db/standard_attr.py", line 167, in get_standard_attr_resource_model_map
    res=resource))
RuntimeError: Model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.MyModel'> tried to register for API resource my_resource which conflicts with model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.Dup'>.

It happens when garbage collector has not cleaned up the offending
subclasses before we call to get_standard_attr_resource_model_map.

** Affects: neutron
     Importance: High
     Assignee: Ihar Hrachyshka (ihar-hrachyshka)
         Status: In Progress


** Tags: gate-failure unittest

** Changed in: neutron
   Importance: Undecided => High

** Tags added: gate-failure unittest

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

Title:
  RuntimeError: Model <class
  'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.MyModel'>
  tried to register for API resource my_resource which conflicts with
  model <class
  'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.Dup'>.

Status in neutron:
  In Progress

Bug description:
  http://logs.openstack.org/52/372552/7/check/gate-neutron-
  python34/e7b00a0/testr_results.html.gz

  Traceback (most recent call last):
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/extensions/test_address_scope.py", line 132, in setUp
      super(TestAddressScope, self).setUp(plugin=plugin, ext_mgr=ext_mgr)
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/tests/unit/db/test_db_base_plugin_v2.py", line 133, in setUp
      self.api = router.APIRouter()
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/api/v2/router.py", line 76, in __init__
      plugin = manager.NeutronManager.get_plugin()
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 244, in get_plugin
      return weakref.proxy(cls.get_instance().plugin)
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 238, in get_instance
      cls._create_instance()
    File "/home/jenkins/workspace/gate-neutron-python34/.tox/py34/lib/python3.4/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
      return f(*args, **kwargs)
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 224, in _create_instance
      cls._instance = cls()
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 126, in __init__
      plugin_provider)
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/manager.py", line 160, in _get_plugin_instance
      return plugin_class()
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/db/standardattrdescription_db.py", line 28, in __new__
      for resource in standard_attr.get_standard_attr_resource_model_map():
    File "/home/jenkins/workspace/gate-neutron-python34/neutron/db/standard_attr.py", line 167, in get_standard_attr_resource_model_map
      res=resource))
  RuntimeError: Model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.MyModel'> tried to register for API resource my_resource which conflicts with model <class 'neutron.tests.unit.db.test_standard_attr.StandardAttrTestCase.test_standard_attr_resource_model_map.<locals>.Dup'>.

  It happens when garbage collector has not cleaned up the offending
  subclasses before we call to get_standard_attr_resource_model_map.

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


Follow ups