Anyone running into this should still discuss the issue here, but this
is now beyond our support lifecycle.
** Changed in: keystone
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1131174
Title:
keystone-manage db_sync fails updating from migrate_version 5
Status in OpenStack Identity (Keystone):
Won't Fix
Bug description:
Hi there,
I am running into a problem with the keystone DB. The output of
keystone-manage db_sync is the following. Further down, I have
additional output from MySQL. I suspect a bug in the update scripts.
My migrate_version before the update is 5. Afterwards it is 6, but the
DB isn't usable.
/opt/keystone/bin/keystone-manage db_sync
Traceback (most recent call last):
File "/opt/keystone/bin/keystone-manage", line 5, in <module>
pkg_resources.run_script('keystone==2013.1', 'keystone-manage')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in
run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in
run_script
execfile(script_filename, namespace, namespace)
File
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/EGG-INFO/scripts/keystone-manage",
line 28, in <module>
cli.main(argv=sys.argv, config_files=config_files)
File
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/keystone/cli.py",
line 148, in main
CONF.command.cmd_class.main()
File
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/keystone/cli.py",
line 53, in main
driver.db_sync()
File
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/keystone/identity/backends/sql.py",
line 130, in db_sync
migration.db_sync()
File
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/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
"/opt/keystone/lib/python2.7/site-packages/keystone-2013.1-py2.7.egg/keystone/common/sql/migrate_repo/versions/007_add_domain_tables.py",
line 50, in upgrade
user_domain_metadata_table.create(migrate_engine, checkfirst=True)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 594, in
create
checkfirst=checkfirst)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
2303, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
1973, in _run_visitor
**kwargs).traverse_single(element)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line
106, in traverse_single
return meth(obj, **kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86,
in visit_table
self.connection.execute(schema.CreateTable(table))
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
1449, in execute
params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
1542, in _execute_ddl
compiled
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
1698, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line
1691, in _execute_context
context)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line
331, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in
execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in
defaulterrorhandler
raise errorclass, errorvalue
sqlalchemy.exc.OperationalError: (OperationalError) (1005, "Can't create
table 'keystone_grizzly.user_domain_metadata' (errno: 150)") '\nCREATE TABLE
user_domain_metadata (\n\tuser_id VARCHAR(64) NOT NULL, \n\tdomain_id
VARCHAR(64) NOT NULL, \n\tdata TEXT, \n\tPRIMARY KEY (user_id, domain_id),
\n\tFOREIGN KEY(user_id) REFERENCES user (id), \n\tFOREIGN KEY(domain_id)
REFERENCES domain (id)\n)\n\n' ()
The error reported in MySQL is:
show engine innodb status;
[...]
------------------------
LATEST FOREIGN KEY ERROR
------------------------
130221 12:42:03 Error in foreign key constraint of table
keystone_grizzly/user_domain_metadata:
FOREIGN KEY(user_id) REFERENCES user (id),
FOREIGN KEY(domain_id) REFERENCES domain (id)
):
Cannot resolve table name close to:
(id),
FOREIGN KEY(domain_id) REFERENCES domain (id)
)
[...]
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1131174/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp