Bug 1891738

Summary: The CLO shouldn't depend on EO resources when deploy collector only clusterlogging instance
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: high Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: unspecified    
Version: 4.6CC: aos-bugs, jcantril, markus.goebl, periklis, rdlugyhe
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: logging-core
Fixed In Version: Doc Type: Bug Fix
Doc Text:
* Previously, the Cluster Logging Operator (CLO) would attempt to reconcile the Elasticsearch resource, which depended upon the Red Hat-provided Elastic Custom Resource Definition (CRD). Attempts to list an unknown kind caused the CLO to exit its reconciliation loop. This happened because the CLO tried to reconcile all of its managed resources whether they were defined or not. The current release fixes this issue. The CLO only reconciles types provided by the Elasticsearch operator if a user defines managed storage. As a result, users can create collector-only deployments of cluster logging by deploying the CLO. (link:https://bugzilla.redhat.com/show_bug.cgi?id=1891738[*BZ#1891738*])
Story Points: ---
Clone Of:
: 1901256 (view as bug list) Environment:
Last Closed: 2021-02-24 11:21:19 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: 1901256    

Description Anping Li 2020-10-27 08:58:16 UTC
Description of problem:
When deploy collector only clusterlogging instance, the CLO failed to generate fluentd resources.

"error":"Unable to create or update logstore for \"instance\": Failure deleting elasticsearch elasticsearch CR for \"instance\": no matches for kind \"Elasticsearch\" in version \"logging.openshift.io/v1\""


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

How reproducible:
Always

Steps to Reproduce:
1. Deploy clusterlogging-operator on the fresh cluster which had never deployed elasicsearch operators

2. Create collector only clusterlogging instance
kind: "ClusterLogging"
metadata:
  name: "instance"
  namespace: openshift-logging
spec:
  managementState: "Managed"
  collection:
    logs:
      type: "fluentd"
      fluentd: {}


Actual results:
The fluentd resources couldn't be generated. 

CLO report error 
"error":"Unable to create or update logstore for \"instance\": Failure deleting elasticsearch elasticsearch CR for \"instance\": no matches for kind \"Elasticsearch\" in version \"logging.openshift.io/v1\""

Expected results:
The CLO can generate collector resources.

Additional info:

Comment 2 Anping Li 2020-11-25 03:40:30 UTC
Verified on clusterlogging.4.7.0-202011241907.p0.

Comment 9 errata-xmlrpc 2021-02-24 11:21:19 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