Bug 1322547

Summary: oslo.log: Unintended assignment of "syslog"
Product: Red Hat OpenStack Reporter: kahou <kalei>
Component: python-oslo-logAssignee: Victor Stinner <vstinner>
Status: CLOSED ERRATA QA Contact: Alexander Stafeyev <astafeye>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.0 (Liberty)CC: apevec, charcrou, chhudson, fdinitto, jschluet, lhh, mburns, sgotliv, skulkarn, tfreger
Target Milestone: gaKeywords: ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-oslo-log-1.11.0-2.el7ost Doc Type: Bug Fix
Doc Text:
Cause: The bug impacts OpenStack services (like neutron) configured to use syslog (use_syslog=True). An identifier (syslog) is unintendedly reassigned in the oslo.log code. Consequence: oslo.log crashes and fails to log messages from OpenStack services. Errors are logged in the service logs (ex: /var/log/neutron/neutron-server.log). Fix: Use a different identifier to not reassign the "syslog" name in the code. Result: oslo.log now logs correclty messages of OpenStack services configured to use syslog.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-15 13:47:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1194008    
Attachments:
Description Flags
script which reproduces the issue with syslog handler none

Description kahou 2016-03-30 17:20:50 UTC
Description of problem:

Fixes syslog handler issue which is causing problems with Neutron services in Openstack Liberty.

Upstream has already fixed that in oslo.log and we would like to have this fix in Redhat package: https://bugs.launchpad.net/oslo.log/+bug/1499620

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

Reproduced it in Liberty

1. In /etc/neutron/neutron.conf, set use_syslog=True
2. Restart neutron server and you will see the following stack Trace

Identifier "syslog" is unintendedly reassigned in _setup_logging_from_conf()
with OSSysLogHandler in oslo_log/log.py.
It causes an error in _find_facility() which expects "syslog" as module.

Actual results:

oslo.log crashes

Expected results:

neutron server should be running fine with syslog enabled

Additional info:

Comment 1 Charles Crouch 2016-04-04 00:53:30 UTC
This was reproduced using RHELOSP8 Beta8

The fix for this issue has merged into stable/liberty branch of oslo.log (https://review.openstack.org/#/c/235954/) and is also available in the 1.12 release of oslo.log.

The request here is to backport this fix, without which neutron breaks when using syslog, into the version of oslo.log shipping with RHELOSP8
Thanks

Comment 6 Alexander Stafeyev 2016-04-14 08:04:41 UTC
Tested on Liberty ( python-oslo-log-1.11.0-2.el7ost.noarch ) 

Reproduction steps: 
1. In /etc/neutron/neutron.conf, set use_syslog=True
2. Restarted the neutron server


the log "Identifier "syslog" is unintended..." was not found in the log after neutron server restart with use_syslog=True configured.

Comment 8 errata-xmlrpc 2016-04-15 13:47:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0636.html

Comment 9 kahou 2016-04-27 21:15:20 UTC
Created attachment 1151625 [details]
script which reproduces the issue with syslog handler