Bug 1753936
Summary: | fluentd couldn't forward logs to rsyslog out:syslog: invalid facility value DEVICE | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Anping Li <anli> | |
Component: | Logging | Assignee: | Rich Megginson <rmeggins> | |
Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 4.1.z | CC: | aos-bugs, calfonso, rmeggins | |
Target Milestone: | --- | Keywords: | Regression | |
Target Release: | 4.3.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause: The data in the journald for facility values is not sanitized, and strange values get in. But this is ok - the plugin will just ignore the strange value and use the configured default value.
Consequence: fluentd emits error messages at the wrong level, which cause confusion for customers.
Fix: Make fluentd log at the proper log level, debug.
Result: fluentd does not complain about invalid facility values.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1756072 (view as bug list) | Environment: | ||
Last Closed: | 2020-01-23 11:06:39 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: | 1756072 |
Description
Anping Li
2019-09-20 10:26:12 UTC
I don't think this is a regression, or at least, it isn't a regression in our code. Apparently, it is quite common to get non-integer values for the SYSLOG_FACILITY field - on Fedora 30:
>sudo journalctl -F SYSLOG_FACILITY | sort
0
1
10
24
3
4
5
9
AGENTS
AUDIT
BRIDGE
BT
CONCHECK
CORE
DEVICE
etc.
You can see that the troublesome DEVICE is in the list.
I think the fix for this will be to change the error log level from `warn` to `debug`
I'm going to target this bz to 4.3, and clone for 4.2, 4.1, and 3.11 @anli - can you confirm that forward isn't working to send logs to rsyslog? If it isn't, then I think this is unrelated to warning message: https://github.com/openshift/origin-aggregated-logging/blob/master/fluentd/out_syslog.rb#L88 begin @packet.facility = Integer(record['systemd']['u']['SYSLOG_FACILITY']) rescue log.warn "out:syslog: invalid facility value #{record['systemd']['u']['SYSLOG_FACILITY']}; reset to default #{@facility}" @packet.facility = @facility end That is, it will issue the message, then continue with the default i.e. it should still be forwarding logs, despite the error message. Yes, It is not related to the message. the message can be sent to rsyslog in 4.1.18 and in 4.2. How could I deal with the bug in 4.2 and 4.3? (In reply to Anping Li from comment #4) > Yes, It is not related to the message. the message can be sent to rsyslog in > 4.1.18 and in 4.2. How could I deal with the bug in 4.2 and 4.3? I intend to clone/backport this fix to 4.2, 4.1, and 3.11. I've already cloned this bz to 4.2: https://bugzilla.redhat.com/show_bug.cgi?id=1756072 Once this https://bugzilla.redhat.com/show_bug.cgi?id=1753936 bz is verified, I can merge the 4.2 fix, which will move https://bugzilla.redhat.com/show_bug.cgi?id=1756072 to MODIFIED, and then I will backport the fix to 4.1 and clone the bz for 4.1, etc. Verified in openshift/ose-logging-fluentd@sha256:d5852e035184bf7f12e26d7fbd6340737bdabd54bc6d34af8375aabeaa50e3d2 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://access.redhat.com/errata/RHBA-2020:0062 |