Ask Your Question

glance-manage db_sync problem

asked 2014-06-02 05:28:23 -0500

Wayn3 gravatar image

updated 2014-06-02 06:12:31 -0500

When i run glance-manage db_sync it throws an error. Can anybody help me with this?

Traceback (most recent call last):
  File "/usr/local/bin/glance-manage", line 5, in <module>
    pkg_resources.run_script('glance==2011.3', 'glance-manage')
  File "/usr/lib/python2.7/dist-packages/", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/EGG-INFO/scripts/glance-manage", line 144, in <module>
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/EGG-INFO/scripts/glance-manage", line 140, in main
    dispatch_cmd(options, args)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/EGG-INFO/scripts/glance-manage", line 112, in dispatch_cmd
    cmd_func(options, args)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/EGG-INFO/scripts/glance-manage", line 100, in do_db_sync
    glance.registry.db.migration.db_sync(options, version=db_version)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/", line 123, in db_sync
    upgrade(options, version=version)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/", line 66, in upgrade
    return versioning_api.upgrade(sql_connection, repo_path, version)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/", line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/util/", line 160, in with_engine
    return f(*a, **kw)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/", line 93, in runchange, step)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/", line 148, in run
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/migrate_repo/versions/", line 48, in upgrade
    tables = [define_images_table(meta)]
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/migrate_repo/versions/", line 27, in define_images_table
    Column('name', String(255)),
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/migrate_repo/", line 33, in <lambda>
    unicode_error=None, _warn_on_bytestring=False)
TypeError: __init__() got an unexpected keyword argument 'assert_unicode'

This is my glance-api.conf file

This is my glance-registry.conf file

Os is Ubuntu 12.04

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-06-02 23:12:46 -0500

manish gravatar image

I have currently icehouse installed in my enviroment and there connection string is defined as below which i feel could be issue with your configuration: you need to add connection string under [database] name space like this : [database] connection = mysql://glance:password@localhost/glance and one more thing in your glance-api.conf file paste_deployname space has missing "["

edit flag offensive delete link more


I had this error and it was caused because I left the password for glance as it was in the instructions when I pasted it into the glance-api.conf. When i replaced it with my chosen password it worked.

jame gravatar imagejame ( 2014-06-04 21:43:40 -0500 )edit

answered 2014-06-02 06:00:44 -0500

manish gravatar image

Can you please share your conf file related to glance and details about the environment(os type, version etc.)

edit flag offensive delete link more

answered 2014-06-02 08:02:33 -0500

SamYaple gravatar image

This was a known issue with Gizzly and below (actually it was a python-sql problem, but it was fixed in Havana, if I recall correctly).

What version of openstack are you running? From those glance package dates, it looks like... Diablo(!)? If so, you can try rolling back the package python-sqlalchemy to something a bit older, but I am not sure how that will effect the rest of the system, dependencies beng what they are and all.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-02 05:28:23 -0500

Seen: 854 times

Last updated: Jun 02 '14