← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1234873] Re: restarting mysql, Keystone doesn't reconnect, AttributeError

 

Reviewed:  https://review.openstack.org/50454
Committed: http://github.com/openstack/keystone/commit/fd5260d452d750ba2ad8e0f3cb77e658d4d56264
Submitter: Jenkins
Branch:    milestone-proposed

commit fd5260d452d750ba2ad8e0f3cb77e658d4d56264
Author: Brant Knudson <bknudson@xxxxxxxxxx>
Date:   Tue Oct 1 16:26:18 2013 -0500

    Fix mysql checkout handler AttributeError
    
    If the mysql_on_checkout handler encountered an error due to
    disconnect, it would fail with an AttributeError,
    
     AttributeError: 'module' object has no attribute 'warn'
    
    This is because it used the logging module where the LOG logger
    should have been used.
    
    Change-Id: Iae8a9bd4aeee6e35508059c20b92d70c36232963
    Closes-Bug: #1234873
    (cherry picked from commit d973ea9a47a6f9892208722f69a0cd127b2f73dc)


** Changed in: keystone
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1234873

Title:
  restarting mysql, Keystone doesn't reconnect, AttributeError

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  When restart the mysqld server that Keystone is connected to, Keystone
  operations fail with a 500 Internal Server Error.

  To recreate, start with normal devstack. Run a keystone command:

  $ keystone user-list
  +----------------------------------+----------+---------+----------------------+
  |                id                |   name   | enabled |        email         |
  +----------------------------------+----------+---------+----------------------+
  | 1fae4ded68444d5fbc646fce442eaff1 |  admin   |   True  |  admin@xxxxxxxxxxx   |
  | 3ff71f71063f4aeea0522d1261267861 | alt_demo |   True  | alt_demo@xxxxxxxxxxx |
  ...

  Then restart mysqld:

  $ sudo service mysql restart

  Then run a keystone command again:

  $ keystone user-list
  Authorization Failed: An unexpected error prevented the server from fulfilling your request. 'module' object has no attribute 'warn' (HTTP 500)

  The Keystone server log has:

    File "/opt/stack/keystone/keystone/common/sql/core.py", line 207, in mysql_on_checkout
      logging.warn(_('Got mysql server has gone away: %s'), e)
  AttributeError: 'module' object has no attribute 'warn'

  The expected behavior is that the Keystone server will reconnect
  properly and the command will work as normal.

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