← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1821567] Re: network_segment_ranges could not load in tricirlce test

 

** No longer affects: neutron

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

Title:
  network_segment_ranges could not load in tricirlce test

Status in Tricircle:
  Fix Committed

Bug description:
  after Use network segment ranges for segment allocation
  https://github.com/openstack/neutron/commit/a01b7125cd965625316d9aec3a7408612b94fc08#diff-441e123742581c5d1da67bf722508f1bR121
  merged in neutron

  many network  unitest could not passed in tricirlce

  the detail info as follows:

  stack@trio-top:~/tricircle$ sudo stestr  run tricircle.tests.unit.network.test_segment_plugin.PluginTest.test_create_segment
  Could not load 'NetworkSegmentRange': 'module' object has no attribute 'NetworkSegmentRange'
  Could not load 'NetworkSegmentRange': 'module' object has no attribute 'NetworkSegmentRange'
  Using RPC transport for notifications. Please use get_notification_transport to obtain a notification transport instance.
  Using RPC transport for notifications. Please use get_notification_transport to obtain a notification transport instance.
  Using RPC transport for notifications. Please use get_notification_transport to obtain a notification transport instance.
  {0} tricircle.tests.unit.network.test_segment_plugin.PluginTest.test_create_segment [0.399660s] ... FAILED

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "/usr/local/lib/python2.7/dist-packages/mock/mock.py", line 1305, in patched
          return func(*args, **keywargs)
        File "tricircle/tests/unit/network/test_segment_plugin.py", line 228, in test_create_segment
          fake_plugin.central_plugin.create_network(neutron_context, network)
        File "tricircle/tests/unit/network/test_central_plugin.py", line 825, in create_network
          net = super(FakePlugin, self).create_network(context, network)
        File "tricircle/network/central_plugin.py", line 322, in create_network
          tenant_id)
        File "tricircle/network/managers.py", line 65, in create_network_segments
          segments = self._process_provider_create(network)
        File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 116, in _process_provider_create
          return [self._process_provider_segment(segment)]
        File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 102, in _process_provider_segment
          self.validate_provider_segment(segment)
        File "/opt/stack/neutron/neutron/plugins/ml2/managers.py", line 258, in validate_provider_segment
          driver.obj.validate_provider_segment(segment)
        File "/opt/stack/neutron/neutron/plugins/ml2/drivers/type_vlan.py", line 238, in validate_provider_segment
          ranges = self.get_network_segment_ranges()
        File "/opt/stack/neutron/neutron/plugins/ml2/drivers/type_vlan.py", line 228, in get_network_segment_ranges
          ranges = self._get_network_segment_ranges_from_db()
        File "/usr/local/lib/python2.7/dist-packages/neutron_lib/db/api.py", line 139, in wrapped
          setattr(e, '_RETRY_EXCEEDED', True)
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
          self.force_reraise()
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
          six.reraise(self.type_, self.value, self.tb)
        File "/usr/local/lib/python2.7/dist-packages/neutron_lib/db/api.py", line 135, in wrapped
          return f(*args, **kwargs)
        File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 154, in wrapper
          ectxt.value = e.inner_exc
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
          self.force_reraise()
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
          six.reraise(self.type_, self.value, self.tb)
        File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 142, in wrapper
          return f(*args, **kwargs)
        File "/usr/local/lib/python2.7/dist-packages/neutron_lib/db/api.py", line 183, in wrapped
          LOG.debug("Retry wrapper got retriable exception: %s", e)
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
          self.force_reraise()
        File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
          six.reraise(self.type_, self.value, self.tb)
        File "/usr/local/lib/python2.7/dist-packages/neutron_lib/db/api.py", line 179, in wrapped
          return f(*dup_args, **dup_kwargs)
        File "/opt/stack/neutron/neutron/plugins/ml2/drivers/type_vlan.py", line 182, in _get_network_segment_ranges_from_db
          ctx, network_type=self.get_type()))
        File "/opt/stack/neutron/neutron/objects/base.py", line 640, in get_objects
          cls, context, _pager=_pager, **cls.modify_fields_to_db(kwargs))
        File "/opt/stack/neutron/neutron/objects/db/api.py", line 52, in get_objects
          **(_pager.to_kwargs(context, obj_cls) if _pager else {}))
        File "/usr/local/lib/python2.7/dist-packages/neutron_lib/db/model_query.py", line 308, in get_collection
          for c in query
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3081, in __iter__
          return self._execute_and_instances(context)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3106, in _execute_and_instances
          result = conn.execute(querycontext.statement, self._params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 980, in execute
          return meth(self, multiparams, params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 273, in _execute_on_connection
          return connection._execute_clauseelement(self, multiparams, params)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1099, in _execute_clauseelement
          distilled_params,
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1240, in _execute_context
          e, statement, parameters, cursor, context
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1456, in _handle_dbapi_exception
          util.raise_from_cause(newraise, exc_info)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 296, in raise_from_cause
          reraise(type(exception), exception, tb=exc_tb, cause=cause)
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1236, in _execute_context
          cursor, statement, parameters, context
        File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 536, in do_execute
          cursor.execute(statement, parameters)
      oslo_db.exception.DBNonExistentTable: (sqlite3.OperationalError) no such table: network_segment_ranges [SQL: u'SELECT network_segment_ranges.id AS network_segment_ranges_id, network_segment_ranges.name AS network_segment_ranges_name, network_segment_ranges."default" AS network_segment_ranges_default, network_segment_ranges.shared AS network_segment_ranges_shared, network_segment_ranges.project_id AS network_segment_ranges_project_id, network_segment_ranges.network_type AS network_segment_ranges_network_type, network_segment_ranges.physical_network AS network_segment_ranges_physical_network, network_segment_ranges.minimum AS network_segment_ranges_minimum, network_segment_ranges.maximum AS network_segment_ranges_maximum, network_segment_ranges.standard_attr_id AS network_segment_ranges_standard_attr_id, standardattributes_1.id AS standardattributes_1_id, standardattributes_1.resource_type AS standardattributes_1_resource_type, standardattributes_1.description AS standardattributes_1_description, standardattributes_1.revision_number AS standardattributes_1_revision_number, standardattributes_1.created_at AS standardattributes_1_created_at, standardattributes_1.updated_at AS standardattributes_1_updated_at \nFROM network_segment_ranges LEFT OUTER JOIN standardattributes AS standardattributes_1 ON standardattributes_1.id = network_segment_ranges.standard_attr_id \nWHERE network_segment_ranges.network_type IN (?)'] [parameters: ('vlan',)] (Background on this error at: http://sqlalche.me/e/e3q8)

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



References