keystone does not attempt to reconnect to sql server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
New
|
Undecided
|
Unassigned | ||
keystone (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I have configured Keystone to use SQL backends (MySQL in my case) for all services running on Precise.
After restarting MySQL, Keystone does not to attempt to reconnect to the database, but instead throws a traceback.
Tests:
------
1. Start MySQL
$ sudo start mysql
mysql start/running, process 12702
2. Start Keystone
$ sudo start keystone
keystone start/running, process 12840
3. Query Keystone
$ keystone user-list
+-----
| id | enabled | email | name |
+-----
| 145e233cd46b428
+-----
4. Restart MySQL
$ sudo restart mysql
mysql start/running, process 12875
5. Query Keystone
$ keystone user-list
Authorization Failed: Unable to communicate with identity service: Traceback (most recent call last):
[... see attached traceback ...]
OperationalError: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT user. id AS user_id, user.name AS user_name, user.extra AS user_extra \nFROM user \nWHERE use r.name = %s \n LIMIT %s' ('admin', 1)
117 . (HTTP 500)
What I Expect:
--------------
I expect that Keystone would attempt to reconnect to the running MySQL server and return data as per normal.
Workaround:
-----------
Restart Keystone after restarting MySQL.
System Details:
---------------
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
$ dpkg-query --show keystone mysql-server python-mysqldb
keystone 2012.1~
mysql-server 5.5.20-0ubuntu3
python-mysqldb 1.2.3-1build1
tags: | added: canonistack |