yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01694
[Bug 1156780] Re: Folsom to Grizzly migration fails on non-empty sqlite db.
** Changed in: keystone
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1156780
Title:
Folsom to Grizzly migration fails on non-empty sqlite db.
Status in OpenStack Identity (Keystone):
Fix Released
Bug description:
Running migrations against a sqlite database (migrate version 4)
results in the following error:
Traceback (most recent call last):
File "/usr/bin/keystone-manage", line 28, in <module>
cli.main(argv=sys.argv, config_files=config_files)
File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 173, in main
CONF.command.cmd_class.main()
File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 53, in main
driver.db_sync()
File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 156, in db_sync
migration.db_sync()
File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 52, in db_sync
return versioning_api.upgrade(CONF.sql.connection, repo_path, version)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
File "<string>", line 2, in _migrate
File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
return f(*a, **kw)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
schema.runchange(ver, change, changeset.step)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
change.run(self.engine, step)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
script_func(engine)
File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py", line 122, in upgrade
upgrade_with_copy(meta, migrate_engine)
File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migrate_repo/versions/015_tenant_to_project.py", line 62, in upgrade_with_copy
insert.execute(membership)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/expression.py", line 2826, in execute
return e._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2454, in _execute_clauseelement
return connection._execute_clauseelement(elem, multiparams, params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1651, in _execute_context
None, None)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1647, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 442, in _init_compiled
grp,m in enumerate(parameters)]
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/compiler.py", line 317, in construct_params
% bindparam.key)
sqlalchemy.exc.StatementError: A value is required for bind parameter 'tenant_id' (original cause: InvalidRequestError: A value is required for bind parameter 'tenant_id') 'INSERT INTO user_project_membership (user_id, tenant_id) VALUES (?, ?)' [(u'273f0166482449e2a82a2917ff9d24fd', u'157af0c5dfa14e8cbd718ce3b266d5c9')]
keystone 1:2013.1+git201303181403~precise-0ubuntu1
python-sqlalchemy 0.7.8-1ubuntu1~cloud0
python-migrate 0.7.2-1ubuntu1
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1156780/+subscriptions