Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1857673

Summary: fluentd.conf is empty when enable namespaces in inputs.application
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: LoggingAssignee: Vimal Kumar <vimalkum>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.6CC: aconway, aos-bugs, mnunes, vimalkum
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:15:06 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:

Description Anping Li 2020-07-16 10:29:08 UTC
Description of problem:
The fluentd.conf was empty when enable namespaces in inputs.application

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

How reproducible:
always

Steps to Reproduce:
1.  deploy CLO operator
2. create clusterlogging instance
cat << EOF | oc create -f -
apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogging"
metadata:
  name: "instance"
  namespace: openshift-logging
spec:
  managementState: "Managed"
  logStore:
    type: "elasticsearch"
    elasticsearch:
      nodeCount: 1
      resources:
        limits:
          memory: 2Gi
        requests:
          cpu: 200m
          memory: 2Gi
      storage: {}
      redundancyPolicy: "ZeroRedundancy"
  visualization:
    type: "kibana"
    kibana:
      replicas: 1
  collection:
    logs:
      type: "fluentd"
      fluentd: {}
EOF
    
3. Enable namespaces in ClusterLogForwarder inputs.application
cat << EOF | oc create -f -
apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
  name: instance
  namespace: openshift-logging
spec:
  pipelines:
    - name: test-app
      inputRefs:
      - inputest
      outputRefs:
      - default
  inputs:
    - name: inputest
      application:
        namespaces:
        - project1
        - project2
EOF
    
4. Check the fluentd.conf
oc extract configmap/fluentd

Actual results:
The fluentd.conf is empty

Expected Result:
Only logs in the project1 and project1 are collected and sent to ES.

Comment 1 Alan Conway 2020-07-22 21:30:58 UTC
I wrote a unit test for the configuration generator and verified that the YAML above does seem to produce the expected fluentd configuration.
We must be losing the configuration somewhere else.

See https://github.com/openshift/cluster-logging-operator/pull/613

Comment 4 Anping Li 2020-07-31 06:45:16 UTC
Verified on latest 4.6 image

Comment 7 errata-xmlrpc 2020-10-27 16:15:06 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 (OpenShift Container Platform 4.6 GA Images), 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:4196