Bug 1903912

Summary: Fluentd Pods remain Init:CrashLoopBackOff status when deploying fluentd standalone
Product: OpenShift Container Platform Reporter: yhe
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: medium Docs Contact:
Priority: high    
Version: 4.5CC: aos-bugs
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: logging-core
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 11:22:30 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:
Bug Depends On:    
Bug Blocks: 1914408    

Description yhe 2020-12-03 05:46:49 UTC
Description of problem:
Fluentd Pods remain Init:CrashLoopBackOff status when deploying fluentd standalone while configuring the legacy syslog method to forward log.
Will upload the openshift-logging project dump later.

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


How reproducible:
Always

Steps to Reproduce:
1. Create configmap/syslog to use legacy syslog method
2. Create ClusterLogging/instance to deploy fluentd standalone
- apiVersion: logging.openshift.io/v1
  kind: ClusterLogging
  metadata:
    name: instance
    namespace: openshift-logging
  spec:
    collection:
      logs:
        fluentd: {}
        type: fluentd
    logStore:
      elasticsearch:
        nodeCount: 0
      type: elasticsearch
    managementState: Managed
3. Check the Fluentd Pod status

Actual results:
Fluentd pods remain Init:CrashLoopBackOff status

Expected results:
Fluentd pods become Running status

Additional info:

Comment 3 Jeff Cantrill 2020-12-03 21:06:22 UTC
Please attach or provide the output of https://github.com/openshift/cluster-logging-operator/tree/master/must-gather which is the latest method to gather information regarding the cluster.  The "init" container should only be including in the deployment if the logstore was defined for the clusterlogging instance

Comment 5 Jeff Cantrill 2020-12-15 22:02:53 UTC
Revisiting this as I did not see this before.  I believe the cluser logging instance is defined incorrectly.

(In reply to yhe from comment #0)

> 2. Create ClusterLogging/instance to deploy fluentd standalone
> - apiVersion: logging.openshift.io/v1
>   kind: ClusterLogging
>   metadata:
>     name: instance
>     namespace: openshift-logging
>   spec:
>     collection:
>       logs:
>         fluentd: {}
>         type: fluentd
>     logStore:
>       elasticsearch:
>         nodeCount: 0
>       type: elasticsearch
>     managementState: Managed

Deploying a collector only requires the collection block like:

   apiVersion: logging.openshift.io/v1
   kind: ClusterLogging
   metadata:
     name: instance
     namespace: openshift-logging
   spec:
     collection:
       logs:
         fluentd: {}
         type: fluentd

Comment 8 Anping Li 2021-01-11 13:22:18 UTC
Verfied on elasticsearch-operator.4.7.0-202101090911.p0. when nodeCount=0, the fluentd pods can be running.

Comment 11 errata-xmlrpc 2021-02-24 11:22:30 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 (Errata Advisory for Openshift Logging 5.0.0), 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-2021:0652