Bug 1838055 - fluentd run.sh expr: division by zero after upgrade when techPreview Logforward enabled
Summary: fluentd run.sh expr: division by zero after upgrade when techPreview Logforwa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 4.5
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 4.5.0
Assignee: Periklis Tsirakidis
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-20 12:25 UTC by Anping Li
Modified: 2023-12-15 17:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: LogForwarding Outputs result in zero outputs if none pass the validation checks. Fluentd checks the number of outputs to reserve buffer space on the node's filesystem. The zero outputs result in the division by zero. Consequence: Fluentd' run script fails and the pod remains in CLBO Fix: Default fluentd's NUM_OUTPUTS to 1 if no outputs provided. Result: No fluentd in CBLO. Logs collected on node's FS until buffers are full or valid outputs provided.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:40:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fluentd configmap (9.26 KB, text/plain)
2020-05-20 12:26 UTC, Anping Li
no flags Details
fluentd run.sh debug logs (4.64 KB, text/plain)
2020-05-20 12:27 UTC, Anping Li
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-logging-operator pull 542 0 None closed Bug 1838055: Reset NUM_OUTPUTS to 1 when all LF outputs invalid 2020-09-09 19:02:09 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:40:43 UTC

Description Anping Li 2020-05-20 12:25:03 UTC
Description of problem:
upgrade from 4.4 to 4.5, fluentd expr: division by zero.

$oc logs fluentd-lgnhd
expr: division by zero
run.sh: line 103: [: too many arguments
expr: syntax error
run.sh: line 108: [: too many arguments

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

How reproducible:
Always

Steps to Reproduce:
1. Install clusterlogging.4.4.0-202005180840.
2. Enable TechPreview Logforward.

kind: LogForwarding
metadata:   
  name: instance   
  namespace: openshift-logging
spec:   
  outputs:     
    - name: elasticsearch-default
      type: elasticsearch
      endpoint: 'elasticsearch.openshift-logging.svc:9200'
      secret:
         name: 'fluentd'
    - name: fluentd-created-by-user
      type: forward
      endpoint: 'fluentdserver.openshift-logging.svc:24224'
      secret:
         name: 'fluentdserver'
  pipelines:
    - name: app-pipeline
      inputSource: logs.app
      outputRefs:
        - elasticsearch-default
    - name: infra-pipeline
      inputSource: logs.infra
      outputRefs:
        - fluentd-created-by-user
    - name: audit-pipeline
      inputSource: logs.audit
      outputRefs:
        - fluentd-created-by-user


3. Enable Configmap syslog forward
 <store>
     @type syslog
     remote_syslog 172.30.66.248
     port 514
     hostname $hostname
     remove_tag_prefix tag
     tag_key ident,systemd.u.SYSLOG_IDENTIFIER
     facility local0
     severity info
     use_record true
     payload_key message
    </store>
4. Upgrade to 4.5.

Actual results:
expr: division by zero. Please refer to the attached ConfigMap and fluent debug Log

Expected results:


Additional info:

Comment 1 Anping Li 2020-05-20 12:26:40 UTC
Created attachment 1690217 [details]
fluentd configmap

Comment 2 Anping Li 2020-05-20 12:27:46 UTC
Created attachment 1690229 [details]
fluentd run.sh debug logs

Comment 5 Anping Li 2020-06-01 09:10:27 UTC
Verified using elasticsearch-operator.4.5.0-202005301517 and clusterlogging.4.5.0-202005302117

Comment 6 errata-xmlrpc 2020-07-13 17:40:29 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-2020:2409

Comment 8 Periklis Tsirakidis 2020-09-04 07:25:10 UTC
@Apurva

A solution [1] is awaiting to get picked up in the the 4.4 z-stream as part of [2] 

[1] https://github.com/openshift/cluster-logging-operator/pull/674
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1861224


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