OpenStack Compute (Nova)

TestMigrations does not work with latest migrate and sqlaclhemy

Reported by Jason Kölker on 2012-02-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Jason Kölker

Bug Description

Brand new virtual env:

ERROR: test_walk_versions (nova.tests.test_migrations.TestMigrations)
Traceback (most recent call last):
  File "/home/jkoelker/openstack/nova/nova/tests/", line 167, in test_walk_versions
    self._walk_versions(engine, self.snake_walk)
  File "/home/jkoelker/openstack/nova/nova/tests/", line 179, in _walk_versions
  File "<string>", line 2, in db_version
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/migrate/versioning/util/", line 159, in with_engine
    return f(*a, **kw)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/migrate/versioning/", line 148, in db_version
    schema = ControlledSchema(engine, repository)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/migrate/versioning/", line 32, in __init__
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/migrate/versioning/", line 44, in load
    self.table = Table(tname, self.meta, autoload=True)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/", line 303, in __new__
    table._init(name, metadata, *args, **kw)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/", line 366, in _init
    self._autoload(metadata, autoload_with, include_columns)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/", line 390, in _autoload
    self, include_columns, exclude_columns
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/engine/", line 2276, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/engine/", line 1900, in run_callable
    return callable_(self, *args, **kwargs)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/engine/", line 259, in reflecttable
    return insp.reflecttable(table, include_columns, exclude_columns)
  File "/home/jkoelker/.virtualenvs/nova/lib/python2.7/site-packages/sqlalchemy/engine/", line 412, in reflecttable
    raise exc.NoSuchTableError(
DatabaseNotControlledError: migrate_version

Jason Kölker (jason-koelker) wrote :

It appears that its creating one sqlite memory db applying the version to it, and then testing a new sqlite memory db for version control.

Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
status: New → Confirmed
status: Confirmed → In Progress

Submitter: Jenkins
Branch: master

commit a7df90089557516a82c0ba8f7368cdd541099059
Author: Jason Kölker <email address hidden>
Date: Fri Feb 24 10:10:21 2012 -0600

    Monkey patch migrate < 0.7.3

    * Works around migrate issue 72 [1] by monkey patching migrate prior
      to import.
    * Removes previous workaround
    * Refactor test config to work under nosetests directly
    * Fixes LP940407


    Change-Id: I219e4cecf8bb2e34ae238ac270428f496378ee61

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.