Merge "Do not use api-paste.ini osprofiler options"

This commit is contained in:
Jenkins 2015-11-24 23:38:03 +00:00 committed by Gerrit Code Review
commit 052138727e
3 changed files with 5 additions and 4 deletions

View File

@ -34,8 +34,6 @@ paste.filter_factory = trove.common.limits:RateLimitingMiddleware.factory
[filter:osprofiler]
paste.filter_factory = osprofiler.web:WsgiMiddleware.factory
hmac_keys = SECRET_KEY
enabled = yes
[app:troveapp]
paste.app_factory = trove.common.api:app_factory

View File

@ -407,7 +407,9 @@ profiler_opts = [
cfg.BoolOpt("enabled", default=False,
help="If False fully disable profiling feature."),
cfg.BoolOpt("trace_sqlalchemy", default=True,
help="If False doesn't trace SQL requests.")
help="If False doesn't trace SQL requests."),
cfg.StrOpt("hmac_keys", default="SECRET_KEY",
help="Secret key to use to sign tracing messages."),
]

View File

@ -35,8 +35,9 @@ def setup_profiler(binary, host):
"Messaging", messaging, context.get_admin_context().to_dict(),
rpc.TRANSPORT, "trove", binary, host)
notifier.set(_notifier)
web.enable(CONF.profiler.hmac_keys)
LOG.warn(_LW("The OpenStack Profiler is enabled. Using one of the "
"hmac_keys specified in the api-paste.ini file "
"hmac_keys specified in the trove.conf file "
"(typically in /etc/trove), a trace can be made of all "
"requests. Only an admin user can retrieve the trace "
"information, however.\n"