From 674ddb026881c20be19a54ba2e2d00f17f9c652b Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Wed, 19 Apr 2017 10:11:49 +0200 Subject: [PATCH] Fix oslo.messaging log level The default log level of oslo.messaging was set on the python package name, which means it didn't take effect for all logs. This fixes it adding it on the namespace name as well. Related-Bug: #1685148 Change-Id: I0263717b9fd4d3c6ee4083c71df9b4b26401a39b --- etc/ironic/ironic.conf.sample | 16 +++++++++++++--- ironic/conf/opts.py | 3 +++ .../messaging-log-level-5f870ea69db53d26.yaml | 4 ++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/messaging-log-level-5f870ea69db53d26.yaml diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index 06722e2ee9..bdb8f93403 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -463,7 +463,7 @@ # List of package logging levels in logger=LEVEL pairs. This # option is ignored if log_config_append is set. (list value) -#default_log_levels = amqp=WARNING,amqplib=WARNING,qpid.messaging=INFO,oslo_messaging=INFO,sqlalchemy=WARNING,stevedore=INFO,eventlet.wsgi.server=INFO,iso8601=WARNING,paramiko=WARNING,requests=WARNING,neutronclient=WARNING,glanceclient=WARNING,urllib3.connectionpool=WARNING,keystonemiddleware.auth_token=INFO,keystoneauth.session=INFO +#default_log_levels = amqp=WARNING,amqplib=WARNING,qpid.messaging=INFO,oslo_messaging=INFO,oslo.messaging=INFO,sqlalchemy=WARNING,stevedore=INFO,eventlet.wsgi.server=INFO,iso8601=WARNING,paramiko=WARNING,requests=WARNING,neutronclient=WARNING,glanceclient=WARNING,urllib3.connectionpool=WARNING,keystonemiddleware.auth_token=INFO,keystoneauth.session=INFO # Enables or disables publication of error events. (boolean # value) @@ -2564,10 +2564,20 @@ # value) #sasl_config_name = -# User name for message broker authentication (string value) +# DEPRECATED: User name for message broker authentication +# (string value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Should use configuration option transport_url to +# provide the username. #username = -# Password for message broker authentication (string value) +# DEPRECATED: Password for message broker authentication +# (string value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +# Reason: Should use configuration option transport_url to +# provide the password. #password = # Seconds to pause before attempting to re-connect. (integer diff --git a/ironic/conf/opts.py b/ironic/conf/opts.py index c670ccb4ba..bf522c17b6 100644 --- a/ironic/conf/opts.py +++ b/ironic/conf/opts.py @@ -88,7 +88,10 @@ def update_opt_defaults(): 'amqp=WARNING', 'amqplib=WARNING', 'qpid.messaging=INFO', + # TODO(therve): when bug #1685148 is fixed in oslo.messaging, we + # should be able to remove one of those 2 lines. 'oslo_messaging=INFO', + 'oslo.messaging=INFO', 'sqlalchemy=WARNING', 'stevedore=INFO', 'eventlet.wsgi.server=INFO', diff --git a/releasenotes/notes/messaging-log-level-5f870ea69db53d26.yaml b/releasenotes/notes/messaging-log-level-5f870ea69db53d26.yaml new file mode 100644 index 0000000000..60bcde7eff --- /dev/null +++ b/releasenotes/notes/messaging-log-level-5f870ea69db53d26.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Fixes an issue where oslo.messaging DEBUG logs were being logged when, by + default, they shouldn't have been.