Glance SQLAlchemy package version needs updating

Bug #987329 reported by Jay Pipes on 2012-04-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance (Ubuntu)
Undecided
Unassigned

Bug Description

Hello all,

When I install glance-registry, it occurred a error as below.

Setting up glance-registry (2012.1-0ubuntu2) ...
Traceback (most recent call last):
  File "/usr/bin/glance-manage", line 122, in <module>
    main()
  File "/usr/bin/glance-manage", line 118, in main
    dispatch_cmd(conf, args)
  File "/usr/bin/glance-manage", line 93, in dispatch_cmd
    cmd_func(conf, args)
  File "/usr/bin/glance-manage", line 81, in do_db_sync
    glance.registry.db.migration.db_sync(conf, version, current_version)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 141, in db_sync
    upgrade(conf, version=version)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 67, in upgrade
    return versioning_api.upgrade(sql_connection, repo_path, version)
  File "/usr/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/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 365, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
    change.run(self.engine, step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
    script_func(engine)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 48, in upgrade
    tables = [define_images_table(meta)]
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 40, in define_images_table
    extend_existing=True)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 210, in __new__
    table._init(name, metadata, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 256, in _init
    self._extra_kwargs(**kwargs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 312, in _extra_kwargs
    "Invalid argument(s) for Table: %r" % kwargs.keys())
TypeError: Invalid argument(s) for Table: ['extend_existing', 'mysql_engine']
dpkg: error processing glance-registry (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Processing triggers for python-support ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 glance-registry
E: Sub-process /usr/bin/dpkg returned an error code (1)

I check DB and found there was no tables except migrate_version. and migrate_version is 0. So I execute glance-manage db_sync again, it occurred the same error as below.

root@ubuntu:/var/lib/glance# glance-manage db_sync
Traceback (most recent call last):
  File "/usr/bin/glance-manage", line 122, in <module>t-packages/sqlalchemy/schem
    main()
  File "/usr/bin/glance-manage", line 118, in main/dist-packages/sqlalchemy/schem
    dispatch_cmd(conf, args)
  File "/usr/bin/glance-manage", line 93, in dispatch_cmd
    cmd_func(conf, args)
  File "/usr/bin/glance-manage", line 81, in do_db_sync
    glance.registry.db.migration.db_sync(conf, version, current_version)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 141, in db_sync
    upgrade(conf, version=version)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migration.py", line 67, in upgrade
    return versioning_api.upgrade(sql_connection, repo_path, version)
  File "/usr/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/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 365, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
    change.run(self.engine, step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
    script_func(engine)
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 49, in upgrade
    tables = [define_images_table(meta)]
  File "/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/001_add_images_table.py", line 41, in define_images_table
    extend_existing=True)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 210, in __new__
    table._init(name, metadata, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 256, in _init
    self._extra_kwargs(**kwargs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 313, in _extra_kwargs
    "Invalid argument(s) for Table: %r" % kwargs.keys())
TypeError: Invalid argument(s) for Table: ['extend_existing', 'mysql_engine']

Maybe the db_sync function got some problems when migrate_version is 0. Please help to clarify. Thanks.

BTW, I check glance-registry.postinst and found the following script. Why glance2012.1 needs to do version-control first when DB does not exist?

if [ ! -e /var/lib/glance/glance.sqlite ] ; then
       su -s /bin/sh -c 'glance-manage version_control 0' glance
fi

Thanks,

Rain

Brian Waldon (bcwaldon) on 2012-04-27
affects: glance → glance (Ubuntu)
Adam Gandelman (gandelman-a) wrote :

This is an odd one. Looks like a sqlalchemy version incompatibility which would only be happening if you're installing the precise packaging onto previous a distro releases (natty, oneiric)

There are some Glance changes we're carrying in 12.04 packaging wrt database initialization and upgrades, please see mailing list post @ https://lists.launchpad.net/openstack/msg10090.html for an explanation

Changed in glance (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for glance (Ubuntu) because there has been no activity for 60 days.]

Changed in glance (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions