Revision history [back]

keystone db missing version control

Hi guys,

I'm trying to upgrade (the usual way) my Keystone database from Icehouse to Kilo. I'm running in an issue if i try to upgrade the database schemata of Keystone.

root@keystone01:~# keystone-manage db_sync
2015-07-24 09:10:04.394 19194 ERROR oslo_db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (ProgrammingError) permission denied for relation migrate_version
 'SELECT migrate_version.repository_id, migrate_version.repository_path, migrate_version.version \nFROM migrate_version \nWHERE migrate_version.repository_id = %(repository_id_1)s' {'repository_id_1': 'keystone'}
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters     context)
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters   File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters     cursor.execute(statement, parameters)
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters ProgrammingError: permission denied for relation migrate_version
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters 
2015-07-24 09:10:04.394 19194 TRACE oslo_db.sqlalchemy.exc_filters 
2015-07-24 09:10:04.664 19194 CRITICAL keystone [-] DbMigrationError: The database is not under version control, but has tables. Please stamp the current version of the schema manually.
2015-07-24 09:10:04.664 19194 TRACE keystone Traceback (most recent call last):
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/bin/keystone-manage", line 44, in <module>
2015-07-24 09:10:04.664 19194 TRACE keystone     cli.main(argv=sys.argv, config_files=config_files)
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 585, in main
2015-07-24 09:10:04.664 19194 TRACE keystone     CONF.command.cmd_class.main()
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 76, in main
2015-07-24 09:10:04.664 19194 TRACE keystone     migration_helpers.sync_database_to_version(extension, version)
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration_helpers.py", line 242, in sync_database_to_version
2015-07-24 09:10:04.664 19194 TRACE keystone     _sync_common_repo(version)
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration_helpers.py", line 148, in _sync_common_repo
2015-07-24 09:10:04.664 19194 TRACE keystone     init_version=init_version)
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line 74, in db_sync
2015-07-24 09:10:04.664 19194 TRACE keystone     current_version = db_version(engine, abs_path, init_version)
2015-07-24 09:10:04.664 19194 TRACE keystone   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line 133, in db_version
2015-07-24 09:10:04.664 19194 TRACE keystone     "The database is not under version control, but has "
2015-07-24 09:10:04.664 19194 TRACE keystone DbMigrationError: The database is not under version control, but has tables. Please stamp the current version of the schema manually.
2015-07-24 09:10:04.664 19194 TRACE keystone

There is missing the migration table with information about the actual schemata state.

The question is (nothing found in any doc or mailing list), how can i stamp this database to Icehouse schemata ?!

Thanks for any help or hints.

Cheers Heiko