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.
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 8Periklis Tsirakidis
2020-09-04 07:25:10 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: