]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Pass debug mode to eventlet.wsgi.server
authorClint Byrum <clint@fewbar.com>
Sat, 7 Sep 2013 04:17:14 +0000 (21:17 -0700)
committerClint Byrum <clint@fewbar.com>
Sat, 7 Sep 2013 04:18:19 +0000 (21:18 -0700)
Previously if any exceptions accidentally made their way to
eventlet.wsgi.server's response handler it would print their traceback.
We only want to show users tracebacks in debug mode. In production we
want them suppressed.

Fixes bug #1222008
Change-Id: Ieb11f75ebffc67bd584432cfd8eeaac010fce7ca

heat/common/wsgi.py

index f50c521d83aec310d77cd442bb7b0c856fba3821..7147f8ab53991ef915c2d67781ff8dc8e9bed355 100644 (file)
@@ -136,6 +136,7 @@ api_cw_group = cfg.OptGroup('heat_api_cloudwatch')
 cfg.CONF.register_group(api_cw_group)
 cfg.CONF.register_opts(api_cw_opts,
                        group=api_cw_group)
+cfg.CONF.import_opt('debug', 'heat.openstack.common.log')
 
 
 class WritableLogger(object):
@@ -310,7 +311,8 @@ class Server(object):
                                  self.application,
                                  custom_pool=self.pool,
                                  url_length_limit=URL_LENGTH_LIMIT,
-                                 log=WritableLogger(self.logger))
+                                 log=WritableLogger(self.logger),
+                                 debug=cfg.CONF.debug)
         except socket.error as err:
             if err[0] != errno.EINVAL:
                 raise