package keystone 2:9.0.0-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1588131 reported by Tudor Holton
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
keystone (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Setting up keystone (2:9.0.0-0ubuntu1) ...
2016-06-02 12:42:43.180 17865 CRITICAL keystone [-] KeyError: <VerNum(45)>
2016-06-02 12:42:43.180 17865 ERROR keystone Traceback (most recent call last):
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/bin/keystone-manage", line 10, in <module>
2016-06-02 12:42:43.180 17865 ERROR keystone sys.exit(main())
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/manage.py", line 47, in main
2016-06-02 12:42:43.180 17865 ERROR keystone cli.main(argv=sys.argv, config_files=config_files)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/cli.py", line 992, in main
2016-06-02 12:42:43.180 17865 ERROR keystone CONF.command.cmd_class.main()
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/cmd/cli.py", line 371, in main
2016-06-02 12:42:43.180 17865 ERROR keystone migration_helpers.sync_database_to_version(extension, version)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration_helpers.py", line 210, in sync_database_to_version
2016-06-02 12:42:43.180 17865 ERROR keystone _sync_common_repo(version)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/keystone/common/sql/migration_helpers.py", line 136, in _sync_common_repo
2016-06-02 12:42:43.180 17865 ERROR keystone init_version=init_version, sanity_check=False)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line 79, in db_sync
2016-06-02 12:42:43.180 17865 ERROR keystone migration = versioning_api.upgrade(engine, repository, version)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
2016-06-02 12:42:43.180 17865 ERROR keystone return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2016-06-02 12:42:43.180 17865 ERROR keystone File "<decorator-gen-15>", line 2, in _migrate
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 160, in with_engine
2016-06-02 12:42:43.180 17865 ERROR keystone return f(*a, **kw)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 345, in _migrate
2016-06-02 12:42:43.180 17865 ERROR keystone changeset = schema.changeset(version)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 82, in changeset
2016-06-02 12:42:43.180 17865 ERROR keystone changeset = self.repository.changeset(database, start_ver, version)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 225, in changeset
2016-06-02 12:42:43.180 17865 ERROR keystone changes = [self.version(v).script(database, op) for v in versions]
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/repository.py", line 189, in version
2016-06-02 12:42:43.180 17865 ERROR keystone return self.versions.version(*p, **k)
2016-06-02 12:42:43.180 17865 ERROR keystone File "/usr/lib/python2.7/dist-packages/migrate/versioning/version.py", line 163, in version
2016-06-02 12:42:43.180 17865 ERROR keystone return self.versions[VerNum(vernum)]
2016-06-02 12:42:43.180 17865 ERROR keystone KeyError: <VerNum(45)>
2016-06-02 12:42:43.180 17865 ERROR keystone

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: keystone 2:9.0.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-87.133-generic 3.13.11-ckt39
Uname: Linux 3.13.0-87-generic i686
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: i386
Date: Thu Jun 2 12:35:22 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2013-12-05 (910 days ago)
InstallationMedia: Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release i386 (20130820.2)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: keystone
Title: package keystone 2:9.0.0-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2016-06-02 (0 days ago)

Revision history for this message
Tudor Holton (tudor) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in keystone (Ubuntu):
status: New → Confirmed
tags: removed: need-duplicate-check
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Tudor, Thanks for reporting this. Is this an upgrade of keystone and if so can you let me know what package version you're upgrade from? That should help us recreate/triage this.

Changed in keystone (Ubuntu):
importance: Undecided → High
Revision history for this message
Maartje Eyskens (maartjee) wrote :

I have the same issue going from 1:2014.1.3-0ubuntu2.1 on Trusty to 2:9.0.0-0ubuntu1 on Xenial

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

IIUC an upgrade over multiple OpenStack releases in one step is not supported, at least not by upstream, since the needed DB migrations need to be performed one at a time. So maybe you will get better results if you go 2014.1 (Icehouse) -> 2014.2 (Juno) -> 2015.1 (Kilo) -> 8.1.2 (Liberty) -> 9.2.0 (Mitaka).

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Tudor, when you get a chance please let me know what package version you're upgrade from. That should help us recreate/triage this. For now I'm marking this as incomplete.

Changed in keystone (Ubuntu):
status: Confirmed → Incomplete
importance: High → Undecided
Revision history for this message
Tudor Holton (tudor) wrote :

Hi Corey,
All the versioning information is at the bottom of the first post.
Cheers,
Tudor

Changed in keystone (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Tudor,

I see you installed/upgraded keystone 2:9.0.0-0ubuntu1. Was this an upgrade from a previous version of keystone? If so, what version? I'm not seeing that above unless I'm overlooking it.

Thanks,
Corey

Changed in keystone (Ubuntu):
importance: Undecided → High
Revision history for this message
Wyllys Ingersoll (wyllys66) wrote :

I have same problem. Upgrading from db version 44. from 1:2014.1.3-0ubuntu2.1 to 2:9.2.0-0ubuntu1
(Trusty to Xenial).

Is there a workaround such as dumping the DB, recreating from scratch, then importing old DB data?

Revision history for this message
Wyllys Ingersoll (wyllys66) wrote :

The python-keystone package (2:9.2.0-0ubuntu1) cannot upgrade from a version prior to kilo because the migration scripts in keystone/common/sql/migrate_repo/versions are missing migration scripts prior to DB version 67 (kilo). The latest version in the 1:2014.1.3-0ubuntu2.1 package is DB version 44.

This seems to be a serious problem that will affect anyone upgrading their servers from Trusty to Xenial. Without a complete migration path, keystone will fail.

It is ridiculous to force the admins to go find all of the intermediate keystone versions and incrementally upgrade each one (Icehouse, Juno, Kilo) until they get to one that will work.

Revision history for this message
Tudor Holton (tudor) wrote :

Isn't this something apt is supposed to handle? I thought if you specify that the upgrade path has to go through a previous version, then it gets that version and follows the trail back. No? If I'm correct then it's a config fault. How do the packages do it that have multiple DB structure changes? They can't have every possible upgrade path in there, surely?

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.