Bug 1097745 - Unable to differentiate syslog debug and trace logs from openshift-origin-node
Summary: Unable to differentiate syslog debug and trace logs from openshift-origin-node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1097748
TreeView+ depends on / blocked
 
Reported: 2014-05-14 12:46 UTC by Dan Mace
Modified: 2015-05-14 23:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1097748 (view as bug list)
Environment:
Last Closed: 2014-07-15 10:28:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Mace 2014-05-14 12:46:07 UTC
Description of problem:

The SyslogLogger implementation in openshift-origin-node doesn't give enough context to allow rsyslog or other downstream systems to distinguish debug and trace logs: they both log to local0 using the debug priority.

I recommend logging trace messages using the local1 facility with the debug priority.

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


How reproducible:


Steps to Reproduce:

1. Configure a node to use Syslog logging by modifying /etc/openshift/node.conf:

PLATFORM_LOG_CLASS=SyslogLogger
PLATFORM_SYSLOG_TRACE_ENABLED=1
PLATFORM_SYSLOG_THRESHOLD=LOG_DEBUG

2. service ruby193-mcollective restart

3. Watch /var/log/messages

Actual results:

Debug and trace logs are combined.

Expected results:

The ability to split the debug/trace logs by modifying /etc/rsyslogd.conf, e.g.:

local1.*   /var/log/platform-trace.log

Additional info:

Comment 2 Meng Bo 2014-05-20 06:03:10 UTC
Checked on devenv_4797, the platform-trace.log will be put into separate log when add the "local1.*   /var/log/platform-trace.log" to /etc/rsyslog.conf.


And the ruby193-mcollective will record the error if the configs in node.conf have wrong value.

W, [2014-05-20T05:53:57.448444 #14935]  WARN -- : agents.rb:95:in `rescue in activate_agent?' Agent activation check for openshift failed: RuntimeError: Couldn't create NodeLogger class SyslogLogger: Invalid PLATFORM_SYSLOG_FACILITY config value: 
W, [2014-05-20T05:53:37.061685 #14835]  WARN -- : agents.rb:95:in `rescue in activate_agent?' Agent activation check for openshift failed: R
untimeError: Couldn't create NodeLogger class SyslogLogger: Invalid PLATFORM_SYSLOG_THRESHOLD config value:


[root@ip-10-47-145-10 ~]# tailf /var/log/platform-trace.log 
May 20 02:50:40 ip-10-47-145-10 openshift-platform[2730]: oo_spawn running /usr/sbin/httxt2dbm -f DB -i /etc/httpd/conf.d/openshift/nodes.txt -o /etc/httpd/conf.d/openshift/nodes.db-20140520-2730-zforql/new.db: {:unsetenv_others=>false, :close_others=>true, :in=>"/dev/null", :out=>#<IO:fd 13>, :err=>#<IO:fd 11>}
May 20 02:50:40 ip-10-47-145-10 openshift-platform[2730]: oo_spawn running ip -o -4 route get 54.81.110.30: {:unsetenv_others=>false, :close_others=>true, :in=>"/dev/null", :out=>#<IO:fd 13>, :err=>#<IO:fd 11>}
May 20 02:50:40 ip-10-47-145-10 openshift-platform[2730]: oo_spawn buffer(12/) 54.81.110.30 via 10.47.145.1 dev eth0  src 10.47.145.10 \    cache  mtu 1500 advmss 1460 hoplimit 64


Note You need to log in before you can comment on or make changes to this bug.