← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1405673] [NEW] db_sync from version 44 to 43 fails

 

Public bug reported:

(.venv)breton@bbobrov-pc ~/src/keystone (master*) $ keystone-manage db_sync 44
(.venv)breton@bbobrov-pc ~/src/keystone (master*) $ keystone-manage db_sync 43
2014-12-25 22:18:38.190 31044 CRITICAL keystone [-] NoSuchTableError: orig_service
2014-12-25 22:18:38.190 31044 TRACE keystone Traceback (most recent call last):
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/bin/keystone-manage", line 6, in <module>
2014-12-25 22:18:38.190 31044 TRACE keystone     exec(compile(open(__file__).read(), __file__, 'exec'))
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/bin/keystone-manage", line 44, in <module>
2014-12-25 22:18:38.190 31044 TRACE keystone     cli.main(argv=sys.argv, config_files=config_files)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/cli.py", line 311, in main
2014-12-25 22:18:38.190 31044 TRACE keystone     CONF.command.cmd_class.main()
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/cli.py", line 74, in main
2014-12-25 22:18:38.190 31044 TRACE keystone     migration_helpers.sync_database_to_version(extension, version)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migration_helpers.py", line 204, in sync_database_to_version
2014-12-25 22:18:38.190 31044 TRACE keystone     _sync_common_repo(version)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migration_helpers.py", line 160, in _sync_common_repo
2014-12-25 22:18:38.190 31044 TRACE keystone     init_version=init_version)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration.py", line 82, in db_sync
2014-12-25 22:18:38.190 31044 TRACE keystone     version)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 202, in downgrade
2014-12-25 22:18:38.190 31044 TRACE keystone     return _migrate(url, repository, version, upgrade=False, err=err, **opts)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "<string>", line 2, in _migrate
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2014-12-25 22:18:38.190 31044 TRACE keystone     return f(*a, **kw)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 366, in _migrate
2014-12-25 22:18:38.190 31044 TRACE keystone     schema.runchange(ver, change, changeset.step)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/schema.py", line 93, in runchange
2014-12-25 22:18:38.190 31044 TRACE keystone     change.run(self.engine, step)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/script/py.py", line 148, in run
2014-12-25 22:18:38.190 31044 TRACE keystone     script_func(engine)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migrate_repo/versions/044_service_enabled.py", line 143, in downgrade
2014-12-25 22:18:38.190 31044 TRACE keystone     _downgrade_service_table_with_copy(meta, migrate_engine)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migrate_repo/versions/044_service_enabled.py", line 120, in _downgrade_service_table_with_copy
2014-12-25 22:18:38.190 31044 TRACE keystone     orig_service_table = sql.Table('orig_service', meta, autoload=True)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 406, in __new__
2014-12-25 22:18:38.190 31044 TRACE keystone     table._init(name, metadata, *args, **kw)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 479, in _init
2014-12-25 22:18:38.190 31044 TRACE keystone     self._autoload(metadata, autoload_with, include_columns)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 503, in _autoload
2014-12-25 22:18:38.190 31044 TRACE keystone     self, include_columns, exclude_columns
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1732, in run_callable
2014-12-25 22:18:38.190 31044 TRACE keystone     return conn.run_callable(callable_, *args, **kwargs)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1241, in run_callable
2014-12-25 22:18:38.190 31044 TRACE keystone     return callable_(self, *args, **kwargs)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 356, in reflecttable
2014-12-25 22:18:38.190 31044 TRACE keystone     return insp.reflecttable(table, include_columns, exclude_columns)
2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 515, in reflecttable
2014-12-25 22:18:38.190 31044 TRACE keystone     raise exc.NoSuchTableError(table.name)
2014-12-25 22:18:38.190 31044 TRACE keystone NoSuchTableError: orig_service
2014-12-25 22:18:38.190 31044 TRACE keystone

** Affects: keystone
     Importance: Undecided
         Status: New

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

Title:
  db_sync from version 44 to 43 fails

Status in OpenStack Identity (Keystone):
  New

Bug description:
  (.venv)breton@bbobrov-pc ~/src/keystone (master*) $ keystone-manage db_sync 44
  (.venv)breton@bbobrov-pc ~/src/keystone (master*) $ keystone-manage db_sync 43
  2014-12-25 22:18:38.190 31044 CRITICAL keystone [-] NoSuchTableError: orig_service
  2014-12-25 22:18:38.190 31044 TRACE keystone Traceback (most recent call last):
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/bin/keystone-manage", line 6, in <module>
  2014-12-25 22:18:38.190 31044 TRACE keystone     exec(compile(open(__file__).read(), __file__, 'exec'))
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/bin/keystone-manage", line 44, in <module>
  2014-12-25 22:18:38.190 31044 TRACE keystone     cli.main(argv=sys.argv, config_files=config_files)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/cli.py", line 311, in main
  2014-12-25 22:18:38.190 31044 TRACE keystone     CONF.command.cmd_class.main()
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/cli.py", line 74, in main
  2014-12-25 22:18:38.190 31044 TRACE keystone     migration_helpers.sync_database_to_version(extension, version)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migration_helpers.py", line 204, in sync_database_to_version
  2014-12-25 22:18:38.190 31044 TRACE keystone     _sync_common_repo(version)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migration_helpers.py", line 160, in _sync_common_repo
  2014-12-25 22:18:38.190 31044 TRACE keystone     init_version=init_version)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration.py", line 82, in db_sync
  2014-12-25 22:18:38.190 31044 TRACE keystone     version)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 202, in downgrade
  2014-12-25 22:18:38.190 31044 TRACE keystone     return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "<string>", line 2, in _migrate
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
  2014-12-25 22:18:38.190 31044 TRACE keystone     return f(*a, **kw)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/api.py", line 366, in _migrate
  2014-12-25 22:18:38.190 31044 TRACE keystone     schema.runchange(ver, change, changeset.step)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/schema.py", line 93, in runchange
  2014-12-25 22:18:38.190 31044 TRACE keystone     change.run(self.engine, step)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/migrate/versioning/script/py.py", line 148, in run
  2014-12-25 22:18:38.190 31044 TRACE keystone     script_func(engine)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migrate_repo/versions/044_service_enabled.py", line 143, in downgrade
  2014-12-25 22:18:38.190 31044 TRACE keystone     _downgrade_service_table_with_copy(meta, migrate_engine)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/keystone/common/sql/migrate_repo/versions/044_service_enabled.py", line 120, in _downgrade_service_table_with_copy
  2014-12-25 22:18:38.190 31044 TRACE keystone     orig_service_table = sql.Table('orig_service', meta, autoload=True)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 406, in __new__
  2014-12-25 22:18:38.190 31044 TRACE keystone     table._init(name, metadata, *args, **kw)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 479, in _init
  2014-12-25 22:18:38.190 31044 TRACE keystone     self._autoload(metadata, autoload_with, include_columns)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 503, in _autoload
  2014-12-25 22:18:38.190 31044 TRACE keystone     self, include_columns, exclude_columns
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1732, in run_callable
  2014-12-25 22:18:38.190 31044 TRACE keystone     return conn.run_callable(callable_, *args, **kwargs)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1241, in run_callable
  2014-12-25 22:18:38.190 31044 TRACE keystone     return callable_(self, *args, **kwargs)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 356, in reflecttable
  2014-12-25 22:18:38.190 31044 TRACE keystone     return insp.reflecttable(table, include_columns, exclude_columns)
  2014-12-25 22:18:38.190 31044 TRACE keystone   File "/home/breton/src/keystone/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 515, in reflecttable
  2014-12-25 22:18:38.190 31044 TRACE keystone     raise exc.NoSuchTableError(table.name)
  2014-12-25 22:18:38.190 31044 TRACE keystone NoSuchTableError: orig_service
  2014-12-25 22:18:38.190 31044 TRACE keystone

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


Follow ups

References