Bug 1145113
| Summary: | [Juno-M3] `keystone-manage db_sync keystone` fails with: DbMigrationError: version should be an integer | ||
|---|---|---|---|
| Product: | [Community] RDO | Reporter: | Kashyap Chamarthy <kchamart> |
| Component: | openstack-keystone | Assignee: | Alan Pevec (Fedora) <apevec> |
| Status: | CLOSED NOTABUG | QA Contact: | Udi Kalifon <ukalifon> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | apevec, ayoung, jlennox, yeylon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-09-22 12:35:23 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
> With Juno-Milestone3 packages, running `keystone-manage db_sync` fails > with: > > 2014-09-22 07:46:35.011 8028 CRITICAL keystone [-] DbMigrationError: > version should be an integer > 4. Create the database tables for the Identity Service: > > $ keystone-manage db_sync keystone usage: keystone-manage [db_sync|db_version|mapping_purge|pki_setup|ssl_setup|token_flush] db_sync [-h] [--extension EXTENSION] [version] Just use: $ keystone-manage db_sync Urgh, sorry about this noise, bad typo :-(. Thank Alan. |
Description of problem ---------------------- With Juno-Milestone3 packages, running `keystone-manage db_sync` fails with: 2014-09-22 07:46:35.011 8028 CRITICAL keystone [-] DbMigrationError: version should be an integer Version ------- $ rpm -qa | egrep -i 'python-sqlalchemy|openstack-*' openstack-neutron-2014.2-0.6.b3.fc22.noarch openstack-utils-2014.1-3.fc21.1.noarch openstack-glance-2014.2-0.7.b3.fc22.noarch python-sqlalchemy-0.9.7-2.fc21.x86_64 openstack-keystone-2014.2-0.4.b3.fc22.noarch How reproducible: Consistently. Steps to Reproduce ------------------ In an OpenStack VM: 1. Setup Keystone: $ openstack-db --init --service keystone 2. Setup the location of databse on config file: $ openstack-config --set /etc/keystone/keystone.conf \ database connection mysql://keystone:fedora@controller/keystone 3. Create Keystone database user: $ mysql -u root -p Enter password: [. . .] MariaDB [(none)]> CREATE DATABASE keystone; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \ -> IDENTIFIED BY 'fedora'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \ -> IDENTIFIED BY 'fedora'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye 4. Create the database tables for the Identity Service: $ keystone-manage db_sync keystone Actual results -------------- $ keystone-manage db_sync keystone $ echo $? 1 From /var/log/keystone/keystone.log: [. . .] 2014-09-22 07:46:35.011 8028 CRITICAL keystone [-] DbMigrationError: version should be an integer 2014-09-22 07:46:35.011 8028 TRACE keystone Traceback (most recent call last): 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/bin/keystone-manage", line 44, in <module> 2014-09-22 07:46:35.011 8028 TRACE keystone cli.main(argv=sys.argv, config_files=config_files) 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/cli.py", line 291, in main 2014-09-22 07:46:35.011 8028 TRACE keystone CONF.command.cmd_class.main() 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/cli.py", line 73, in main 2014-09-22 07:46:35.011 8028 TRACE keystone migration_helpers.sync_database_to_version(extension, version) 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/common/sql/migration_helpers.py", line 204, in sync_database_to_version 2014-09-22 07:46:35.011 8028 TRACE keystone _sync_common_repo(version) 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/lib/python2.7/site-packages/keystone/common/sql/migration_helpers.py", line 160, in _sync_common_repo 2014-09-22 07:46:35.011 8028 TRACE keystone init_version=init_version) 2014-09-22 07:46:35.011 8028 TRACE keystone File "/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration.py", line 72, in db_sync 2014-09-22 07:46:35.011 8028 TRACE keystone message=_("version should be an integer")) 2014-09-22 07:46:35.011 8028 TRACE keystone DbMigrationError: version should be an integer 2014-09-22 07:46:35.011 8028 TRACE keystone [. . .] Expected results ---------------- DB sync to be successful, and all relevant tables for Keystone should be created correctly. Additional info --------------- (a) MariaDB info (No tables for Keystone are created): $ mysql -u keystone -p'fedora' [. . .] MariaDB [(none)]> use keystone; show tables; Database changed Empty set (0.00 sec) (b) SELinux: $ getenforce Permissive $ sestatus sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: permissive Mode from config file: permissive Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 29