glance-manage db_sync problem

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

Wayn3 gravatar image

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

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/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", 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>
    main()
  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/migration.py", 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/migration.py", line 66, in upgrade
    return versioning_api.upgrade(sql_connection, repo_path, version)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", 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/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 93, in runchange
    change.run(self.engine, step)
  File "/usr/local/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 148, in run
    script_func(engine)
  File "/usr/local/lib/python2.7/dist-packages/glance-2011.3-py2.7.egg/glance/registry/db/migrate_repo/versions/001_add_images_table.py", 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/001_add_images_table.py", 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/schema.py", 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 http://paste.openstack.org/show/82408/

This is my glance-registry.conf file http://paste.openstack.org/show/82409/

Os is Ubuntu 12.04

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

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

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

Comments

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 -0600 )edit
0

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

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
0

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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 899 times

Last updated: Jun 02 '14