[Bug 953985] [NEW] keystone does not attempt to reconnect to sql server

Andrew Glen-Young 953985 at bugs.launchpad.net
Tue Mar 13 12:31:18 UTC 2012


Public bug reported:

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    | demo at example.com    | 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

** Affects: keystone (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to keystone in Ubuntu.
https://bugs.launchpad.net/bugs/953985

Title:
  keystone does not attempt to reconnect to sql server

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/keystone/+bug/953985/+subscriptions



More information about the Ubuntu-server-bugs mailing list