keystone postinst fails with KeyError: <VerNum(4)>

Bug #1094921 reported by James Troup
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystone (Ubuntu)
Expired
High
Unassigned

Bug Description

When upgrading from 2012.1+stable~20120824-a16a0ab9-0ubuntu2.2 to
2012.1+stable~20120824-a16a0ab9-0ubuntu2.3 (lovely version numbers, by
the way), I'm getting the following spew from the postinst:

| Setting up keystone (2012.1+stable~20120824-a16a0ab9-0ubuntu2.3) ...
| Traceback (most recent call last):
| File "/usr/bin/keystone-manage", line 28, in <module>
| cli.main(argv=sys.argv, config_files=config_files)
| File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 148, in main
| return run(cmd, (args[:1] + args[2:]))
| File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 134, in run
| return CMDS[cmd](argv=args).run()
| File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 36, in run
| return self.main()
| File "/usr/lib/python2.7/dist-packages/keystone/cli.py", line 57, in main
| driver.db_sync()
| File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 135, in db_sync
| migration.db_sync()
| File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration.py", line 54, in db_sync
| CONF.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 345, in _migrate
| changeset = schema.changeset(version)
| File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 80, in changeset
| changeset = self.repository.changeset(database, start_ver, version)
| File "/usr/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 225, in changeset
| changes = [self.version(v).script(database, op) for v in versions]
| File "/usr/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 189, in version
| return self.versions.version(*p, **k)
| File "/usr/lib/python2.7/dist-packages/migrate/versioning/version.py", line 140, in version
| return self.versions[VerNum(vernum)]
| KeyError: <VerNum(4)>
| dpkg: error processing keystone (--configure):
| subprocess installed post-installation script returned error exit status 1

This is on Ubuntu 12.04 with precise-proposed enabled.

James Troup (elmo)
tags: added: canonistack
tags: added: precise
Changed in keystone (Ubuntu):
importance: Undecided → High
assignee: nobody → Canonical Server Team (canonical-server)
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Looks like an issue in the postinst's call to 'keystone-manage db_sync'. Can't seem to reproduce when upgrading between the same versions, using the default (empty) local sqlite db, but this was probably hit against a live, remote database?

James, what db backend is in use? Can you confirm the database is under python-migrate's version control? There should be a 'migrate_version' table in Keystone's database with a 'version' field, likely set to '4' (for Essex, anyway)

Changed in keystone (Ubuntu):
status: New → Incomplete
James Page (james-page)
Changed in keystone (Ubuntu):
assignee: Canonical Server Team (canonical-server) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in keystone (Ubuntu):
status: Incomplete → Expired
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.