'keystone-manage database sync' doesn't work

Bug #921126 reported by Brian Lamar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Brian Lamar

Bug Description

root@z2-auth:~# su -c "keystone-manage database sync" keystone
ERROR: you need to pass either an existing engine or a database uri
No handlers could be found for logger "keystone.manage"
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 24, in <module>
    keystone.manage.main()
  File "/usr/lib/python2.6/dist-packages/keystone/manage/__init__.py", line 485, in main
    process(*parse_args(args))
  File "/usr/lib/python2.6/dist-packages/keystone/manage/__init__.py", line 311, in process
    args)
  File "/usr/lib/python2.6/dist-packages/keystone/manage/__init__.py", line 424, in do_db_sync
    migration.db_sync(options, version=db_version)
  File "/usr/lib/python2.6/dist-packages/keystone/backends/sqlalchemy/migration.py", line 168, in db_sync
    _version_control(sql_connection)
  File "/usr/lib/python2.6/dist-packages/keystone/backends/sqlalchemy/migration.py", line 157, in _version_control
    return versioning_api.version_control(sql_connection, repo_path)
  File "<string>", line 2, in version_control
  File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/util/__init__.py", line 155, in with_engine
    engine = construct_engine(url, **kw)
  File "/usr/local/lib/python2.6/dist-packages/migrate/versioning/util/__init__.py", line 116, in construct_engine
    raise ValueError("you need to pass either an existing engine or a database uri")
ValueError: you need to pass either an existing engine or a database uri

When looking into things, we seem to be passing the entire "options" array to the migrate library...but it only seems to need the 'sql_connection' part of options.

Brian Lamar (blamar)
Changed in keystone:
assignee: nobody → Brian Lamar (blamar)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/3361

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/3361
Committed: http://github.com/openstack/keystone/commit/b680202c644d3849b096e1c8b282db649f646673
Submitter: Jenkins
Branch: master

commit b680202c644d3849b096e1c8b282db649f646673
Author: Brian Lamar <email address hidden>
Date: Tue Jan 24 13:31:04 2012 -0500

    Fix for bug 921126

    Updated soon-to-be-legacy 'keystone-manage database sync' to pass the
    correct information to migrate lib.

    Change-Id: Id3a8345c17efd4be7c2056db68dade4bdb86cf9a

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
milestone: none → essex-3
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.