keystone does not attempt to reconnect to sql server

Bug #953985 reported by Andrew Glen-Young
8
This bug affects 1 person
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 |
 +----------------------------------+---------+---------------------+---------+
 | 145e233cd46b4285917b43b66525f422 | True | <email address hidden> | demo |
 +----------------------------------+---------+---------------------+---------+

 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_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu precise (development branch)"

$ dpkg-query --show keystone mysql-server python-mysqldb
keystone 2012.1~rc1~20120308.2103-0ubuntu1
mysql-server 5.5.20-0ubuntu3
python-mysqldb 1.2.3-1build1

Tags: canonistack
Revision history for this message
Andrew Glen-Young (aglenyoung) wrote :
James Troup (elmo)
tags: added: canonistack
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.