diff options
author | Ben Nemec <bnemec@us.ibm.com> | 2013-02-25 21:00:06 +0000 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2013-03-12 13:52:12 -0500 |
commit | 6853e18c4d7fad803d60cf9bb446f41944497dfe (patch) | |
tree | b0b757d321ca97e3ed0cf9a720485cfc6fd0d8e5 /keystone/common/wsgi.py | |
parent | 45228caa7335420d5c3bbe8a3c10e921e1dcaa3e (diff) | |
download | keystone-6853e18c4d7fad803d60cf9bb446f41944497dfe.tar.gz keystone-6853e18c4d7fad803d60cf9bb446f41944497dfe.tar.xz keystone-6853e18c4d7fad803d60cf9bb446f41944497dfe.zip |
Catch and log server exceptions
Fixes bug 1133041
Exceptions from the keystone WSGI server can occur and not be logged.
This means keystone will appear to silently crash, so this change
catches these exceptions and logs them so the user can determine
the cause of the crash.
Change-Id: Iecc4b8062fa4e7dbe021627613412b5dfc635432
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r-- | keystone/common/wsgi.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 672a82f3..8ec0647f 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -130,8 +130,12 @@ class Server(object): def _run(self, application, socket): """Start a WSGI server in a new green thread.""" log = logging.getLogger('eventlet.wsgi.server') - eventlet.wsgi.server(socket, application, custom_pool=self.pool, - log=WritableLogger(log)) + try: + eventlet.wsgi.server(socket, application, custom_pool=self.pool, + log=WritableLogger(log)) + except Exception: + LOG.exception(_('Server error')) + raise class Request(webob.Request): |