← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1440797] [NEW] Fullstack test db fixture usage conflicts with retargetable db fixture usage

 

Public bug reported:

When the fullstack sanity test runs ahead of the retargetable example,
the retargetable test fails with the error that follows.

Better coordination is needed between tests that rely on oslo_db's
MySqlOpportunisticTestCase and Neutron's SqlFixture to avoid this kind
of failure.

2015-04-04 00:58:35.918 | 2015-04-04 00:58:35.845 | {1} neutron.tests.fullstack.test_sanity.TestSanity.test_sanity [3.159554s] ... ok
2015-04-04 00:58:35.937 | 2015-04-04 00:58:35.865 | {1} neutron.tests.retargetable.test_example.TestExample.test_network_lifecycle(Ml2Plugin) [0.013102s] ... 


Traceback (most recent call last):
  File "neutron/tests/retargetable/base.py", line 80, in setUp
    self.useFixture(self.client)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/testtools/testcase.py", line 679, in useFixture
    reraise(*exc_info)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/testtools/testcase.py", line 666, in useFixture
    fixture.setUp()
  File "neutron/tests/retargetable/client_fixtures.py", line 75, in setUp
    self.useFixture(testlib_api.SqlFixture())
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/fixtures/fixture.py", line 192, in useFixture
    fixture.setUp()
  File "neutron/tests/unit/testlib_api.py", line 64, in setUp
    engine = db_api.get_engine()
  File "neutron/db/api.py", line 39, in get_engine
    facade = _create_facade_lazily()
  File "neutron/db/api.py", line 32, in _create_facade_lazily
    _FACADE = session.EngineFacade.from_config(cfg.CONF, sqlite_fk=True)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 880, in from_config
    retry_interval=conf.database.retry_interval)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 796, in __init__
    **engine_kwargs)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 413, in create_engine
    _test_connection(engine, max_retries, retry_interval)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 583, in _test_connection
    return engine.connect()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1890, in connect
    return self._connection_cls(self, **kwargs)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 60, in __init__
    self.__connection = connection or engine.raw_connection()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 225, in raw_connection
    self.pool.unique_connection, _connection)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 219, in _wrap_pool_connect
    e, dialect, self)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 324, in _handle_dbapi_exception_noconnection
    six.reraise(type(newraise), newraise, exc_info[2])
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 215, in _wrap_pool_connect
    return fn()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 280, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 645, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 440, in checkout
    rec = pool._do_get()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 964, in _do_get
    return self._create_connection()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 285, in _create_connection
    return _ConnectionRecord(self)
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 411, in __init__
    self.connection = self.__connect()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 539, in __connect
    connection = self.__pool._creator()
  File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 200, in connect
    raise original_exception
sqlalchemy.exc.OperationalError: (OperationalError) (1049, "Unknown database 'kvljuegtta'") None None

** Affects: neutron
     Importance: Low
         Status: New

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

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

Title:
  Fullstack test db fixture usage conflicts with retargetable db fixture
  usage

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  When the fullstack sanity test runs ahead of the retargetable example,
  the retargetable test fails with the error that follows.

  Better coordination is needed between tests that rely on oslo_db's
  MySqlOpportunisticTestCase and Neutron's SqlFixture to avoid this kind
  of failure.

  2015-04-04 00:58:35.918 | 2015-04-04 00:58:35.845 | {1} neutron.tests.fullstack.test_sanity.TestSanity.test_sanity [3.159554s] ... ok
  2015-04-04 00:58:35.937 | 2015-04-04 00:58:35.865 | {1} neutron.tests.retargetable.test_example.TestExample.test_network_lifecycle(Ml2Plugin) [0.013102s] ... 

  
  Traceback (most recent call last):
    File "neutron/tests/retargetable/base.py", line 80, in setUp
      self.useFixture(self.client)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/testtools/testcase.py", line 679, in useFixture
      reraise(*exc_info)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/testtools/testcase.py", line 666, in useFixture
      fixture.setUp()
    File "neutron/tests/retargetable/client_fixtures.py", line 75, in setUp
      self.useFixture(testlib_api.SqlFixture())
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/fixtures/fixture.py", line 192, in useFixture
      fixture.setUp()
    File "neutron/tests/unit/testlib_api.py", line 64, in setUp
      engine = db_api.get_engine()
    File "neutron/db/api.py", line 39, in get_engine
      facade = _create_facade_lazily()
    File "neutron/db/api.py", line 32, in _create_facade_lazily
      _FACADE = session.EngineFacade.from_config(cfg.CONF, sqlite_fk=True)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 880, in from_config
      retry_interval=conf.database.retry_interval)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 796, in __init__
      **engine_kwargs)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 413, in create_engine
      _test_connection(engine, max_retries, retry_interval)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/session.py", line 583, in _test_connection
      return engine.connect()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1890, in connect
      return self._connection_cls(self, **kwargs)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 60, in __init__
      self.__connection = connection or engine.raw_connection()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 225, in raw_connection
      self.pool.unique_connection, _connection)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 219, in _wrap_pool_connect
      e, dialect, self)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 324, in _handle_dbapi_exception_noconnection
      six.reraise(type(newraise), newraise, exc_info[2])
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 215, in _wrap_pool_connect
      return fn()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 280, in unique_connection
      return _ConnectionFairy._checkout(self)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 645, in _checkout
      fairy = _ConnectionRecord.checkout(pool)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 440, in checkout
      rec = pool._do_get()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 964, in _do_get
      return self._create_connection()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 285, in _create_connection
      return _ConnectionRecord(self)
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 411, in __init__
      self.connection = self.__connect()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 539, in __connect
      connection = self.__pool._creator()
    File "/opt/stack/new/neutron/.tox/dsvm-functional/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/compat/handle_error.py", line 200, in connect
      raise original_exception
  sqlalchemy.exc.OperationalError: (OperationalError) (1049, "Unknown database 'kvljuegtta'") None None

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


Follow ups

References