Bug 1707176 - JOURNAL_READ_FROM_HEAD defaults to true
Summary: JOURNAL_READ_FROM_HEAD defaults to true
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.1.0
Assignee: Jeff Cantrill
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks: 1707524 1707556 1707557
TreeView+ depends on / blocked
 
Reported: 2019-05-07 00:59 UTC by Rich Megginson
Modified: 2019-06-04 10:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The environment variable JOURNAL_READ_FROM_HEAD is set to the empty string. This causes the default value of read_from_head for the journald input to be true. When Fluentd starts up for the first time on a node, it reads in the entire journal. Consequence: It may take hours for system messages to show up in Elasticsearch and Kibana. Fix: Fluentd will check if the value is set _and_ is not empty, otherwise, it will use a default of false. Result: Fluentd will read from the tail of the journal when it starts up on a new node.
Clone Of:
: 1707524 (view as bug list)
Environment:
Last Closed: 2019-06-04 10:48:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:48:42 UTC
Github openshift origin-aggregated-logging pull 1630 None None None 2019-05-07 00:59:12 UTC

Description Rich Megginson 2019-05-07 00:59:13 UTC
Description of problem:

The default value for JOURNAL_READ_FROM_HEAD is true, meaning that when fluentd starts up, it tries to read in the entire journald by default.

The reason is that the cluster-logging-operator sets the env. var. JOURNAL_READ_FROM_HEAD to the empty string "".
Fluentd has this code:

     read_from_head "#{ENV['JOURNAL_READ_FROM_HEAD'] || 'false'}"

which then evaluates to 

     read_from_head

since read_from_head is a boolean parameter, this tells Fluentd to set the value to true, which is the opposite of the intention.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
https://github.com/openshift/origin-aggregated-logging/pull/1630

Comment 3 Anping Li 2019-05-08 04:55:48 UTC
Verified and pass using openshift/ose-logging-fluentd:v4.1.0-201905070632

Comment 5 errata-xmlrpc 2019-06-04 10:48:31 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://access.redhat.com/errata/RHBA-2019:0758


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