Bug 1557431 - [fluentd] take forward + secure_forward outputs into account when computing NUM_OUTPUTS
Summary: [fluentd] take forward + secure_forward outputs into account when computing N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.6.z
Assignee: Jeff Cantrill
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-16 14:56 UTC by François Cami
Modified: 2022-03-13 14:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The fluentd file buffer size is calculated in the fluentd start script run.sh at the start up time. In the calculation, the script gathers the number of outputs, then the available disk space is divided by the gathered number. When gathering the number of outputs, it missed the case for the non-secure forward. If it happens to be configured, the number of outputs is one less than actual. Consequence: When the non-secure forward is configured, the calculated file buffer size is larger than the expected size, which might cause the disk full on the filesystem for the fluentd file buffer. Fix: The non-secure forward case is taken account. Result: The file buffer size is correctly calculated when the non-secure forward is configured.
Clone Of:
Environment:
Last Closed: 2018-05-17 07:58:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift origin-aggregated-logging pull 1021 0 None None None 2018-03-16 16:59:59 UTC
Red Hat Product Errata RHBA-2018:1579 0 None None None 2018-05-17 07:59:26 UTC

Description François Cami 2018-03-16 14:56:11 UTC
In run.sh, specifically line 218:

https://github.com/openshift/origin-aggregated-logging/blob/master/fluentd/run.sh#L218

sec_forward_files=$( grep -l "@type *secure_forward" ${CFG_DIR}/*/* 2> /dev/null || : )

and line 222:

https://github.com/openshift/origin-aggregated-logging/blob/master/fluentd/run.sh#L222

grep "@type *secure_forward" $afile | while read -r line; do


we only take the secure_forward plugin into account, not the forward plugin.

Changing the two afore-mentioned lines to:
sec_forward_files=$( grep -l "@type *forward" ${CFG_DIR}/*/* 2> /dev/null || : )
and:
grep "@type *forward" $afile | while read -r line; do
takes into account both secure_forward and forward, computing the value of NUM_OUTPUTS properly.

Comment 3 François Cami 2018-03-16 16:24:10 UTC
Upstream PR: https://github.com/openshift/origin-aggregated-logging/pull/1021

Comment 6 Jeff Cantrill 2018-04-27 14:48:40 UTC
Backported to 3.6 in https://github.com/openshift/origin-aggregated-logging/pull/1030

Comment 9 Jeff Cantrill 2018-05-04 13:01:51 UTC
Noriko,

Please update the doc text for this issue

Comment 10 Noriko Hosoi 2018-05-04 17:17:42 UTC
(In reply to Jeff Cantrill from comment #9)
> Noriko,
> 
> Please update the doc text for this issue

Done!

Comment 11 Anping Li 2018-05-09 01:56:19 UTC
Verified with openshift3/logging-fluentd:v3.6.173.0.117-1

Comment 14 errata-xmlrpc 2018-05-17 07:58:35 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-2018:1579


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