Ask Your Question

CentOS 6.5 - Keystone Installation - DbMigrationError: version should be an integer

asked 2014-09-13 08:18:37 -0500

updated 2014-09-13 09:57:30 -0500

lafada gravatar image

I am at this point in the installation guide for setting up openstack (Icehouse) on CentOS 6.5.

When instructing keystone to initialize the necessary tables with the following command: sudo keystone-manage db_sync keystone, I get no output. I checked the mysql database and there are no tables within keystone. Checking the logs at /var/log/keystone/keystone.log with the root user, I see the following error message for every time I run that command.

2014-09-13 14:15:52.248 1787 CRITICAL keystone [-] DbMigrationError: version should be an integer

Where do I need to specify a version number?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-13 12:54:50 -0500

updated 2014-09-14 03:38:34 -0500

I managed to "work around" the issue with the help from the redhat documentation on deploying openstack, which tells us to use sudo openstack-db --init --service keystone --password PASSWORD

I had to run sudo /usr/bin/openstack-db --drop --service keystone first, then run sudo openstack-db --init --service keystone --password KEYSTONE_USER_PASSWORD

which then resulted in the following error output:

Verified connectivity to MySQL.
Creating 'keystone' database.
Updating 'keystone' database password in /etc/keystone/keystone.conf
Initializing the keystone database, please wait...
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 51, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/usr/lib/python2.6/site-packages/keystone/", line 189, in main
  File "/usr/lib/python2.6/site-packages/keystone/", line 56, in setup_logging
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/", line 461, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/", line 525, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(logpath)
  File "/usr/lib64/python2.6/logging/", line 377, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.6/logging/", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.6/logging/", line 846, in _open
    stream = open(self.baseFilename, self.mode)

It looked like it was having accessing the logs, so i ran: sudo chmod 777 /var/log/keystone/keystone.log

before running the previous two commands again (drop and init) and it worked.

This feels wrong with editing the permissions of the log file, and would rather find a solution to get the original command in the icehouse documentation working.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-09-13 08:18:37 -0500

Seen: 1,045 times

Last updated: Sep 14 '14