keystone upgrade fails due to mysql not being available when both installed on the same server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
keystone (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
I was upgrading a 12.04 VM and encountered the following error on upgrade:
Setting up keystone (2012.1+
Traceback (most recent call last):
File "/usr/bin/
cli.
File "/usr/lib/
return run(cmd, (args[:1] + args[2:]))
File "/usr/lib/
return CMDS[cmd]
File "/usr/lib/
return self.main()
File "/usr/lib/
driver.
File "/usr/lib/
migration.
File "/usr/lib/
current_version = db_version()
File "/usr/lib/
return db_version_
File "/usr/lib/
CONF.
File "<string>", line 2, in version_control
File "/usr/lib/
return f(*a, **kw)
File "/usr/lib/
ControlledS
File "/usr/lib/
table = cls._create_
File "/usr/lib/
if not table.exists():
File "/usr/lib/
self.name, schema=self.schema)
File "/usr/lib/
conn = self.contextual
File "/usr/lib/
self.
File "/usr/lib/
return _ConnectionFair
File "/usr/lib/
rec = self._connectio
File "/usr/lib/
con = self._create_
File "/usr/lib/
return _ConnectionReco
File "/usr/lib/
self.connection = self.__connect()
File "/usr/lib/
connection = self.__
File "/usr/lib/
return dialect.
File "/usr/lib/
return self.dbapi.
File "/usr/lib/
return Connection(*args, **kwargs)
File "/usr/lib/
super(
sqlalchemy.
dpkg: error processing keystone (--configure):
subprocess installed post-installation script returned error exit status 1
This happens when mysql server is upgraded at the same time as keystone due to the ordering of the package upgrade:
...
Preparing to replace mysql-server-5.5 5.5.22-0ubuntu1 (using .../mysql-
mysql stop/waiting
...
Preparing to replace keystone 2012.1-0ubuntu1 (using .../keystone_
keystone stop/waiting
Unpacking replacement keystone ...
Preparing to replace python-keystone 2012.1-0ubuntu1 (using .../python-
Unpacking replacement python-keystone ...
...
Setting up keystone (2012.1+
Traceback (most recent call last):
... sqlalchemy.
dpkg: error processing keystone (--configure):
subprocess installed post-installation script returned error exit status 1
...
Setting up mysql-server-5.5 (5.5.24-
mysql start/running, process 29811
Notice how mysql server is stopped, keystone is upgraded with its postinst running before mysql server is started again.
'sudo apt-get -f install' will resolve the issue (of course).
description: | updated |
Thanks for reporting this bug. I would mark it high priority, as apt-get -f install is a workaround I'll lower that to medium.