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.
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)