keystone-manage db_sync won't create tables in mysql?

asked 2014-11-20 23:55:18 -0500

splucena gravatar image

OS: ubuntu-server 14.04

I'm following this installation guide docs.openstack.org/icehouse/install-guide/install/apt/content/keystone-install.html

After installing keystone and setting mysql connection in /etc/keystone/keystone.conf, deleted keystone.db in /var/lib/keystone, I run this command su -s /bin/sh -c "keystone-manage db_sync" keystone that should generatte tables in mysql keystone database. It only recreates keystone.db. No error in the logs.

What am I missing?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2014-11-21 00:07:19 -0500

That means it is using SQLIte as back-end.

Make sure "connection" string in "/etc/keystone/keystone.conf" configured properly. And also check there should be only one connection variable, and that too under the database block.

If you are not able to figure it out, then paste you configuration file.

edit flag offensive delete link more
0

answered 2019-12-05 10:03:48 -0500

If this is the case possible cause for this is either there is a second entry for connection in /etc/keystone/keystone.conf or some authentication problem .

To check that you can run the below commands

$ keystone-manage db_sync 2> stderr.log $ cat stderr.log 2014-04-29 10:31:17.072 35866 CRITICAL keystone [-] OperationalError: (OperationalError) (2005, "Unknown MySQL server host 'controller' (0)") None None

edit flag offensive delete link more
0

answered 2014-11-21 00:20:53 -0500

splucena gravatar image

updated 2014-11-21 00:22:34 -0500

[database] connection = mysql://keystone:keystone@controller/keystone

But I'ts nowhere in the installation guide that I should comment out connection to sqlite. connection = sqlite////var/lib/keystone/keystone.db. I think it's nice to include it in the documentation as well. Since they have included in the documentation to delete /var/lib/keystone/keystone.db.

edit flag offensive delete link more

Comments

Yeah and where ever you see like =<some value=""> in the documentation. Check if that variable is already present in that configuration file or not. If it is present then MODIFY it, it that is not present then add it.

Also make sure you are adding to the correct block in the configuration file.

TechPatron gravatar imageTechPatron ( 2014-11-21 00:41:42 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-11-20 23:55:18 -0500

Seen: 2,005 times

Last updated: Nov 21 '14