-
Bug
-
Resolution: Done
-
Normal
-
Logging 5.6.3
-
False
-
False
-
NEW
-
VERIFIED
-
-
-
-
Log Collection - Sprint 233
-
Moderate
Description of problem:
When installed only the CLO since not needed the EO because all the logs are logforwarded, the CLO pod returns continually the message error:
$ oc logs $(oc get pod -l name=cluster-logging-operator -o name) |grep "Failure deleting elasticsearch elasticsearch CR" |head -1 {"_ts":"2023-03-13T09:13:10.794416893Z","_level":"0","_component":"cluster-logging-operator","_message":"Error removing component","_error":{"msg":"Failure deleting elasticsearch elasticsearch CR for \"instance\": no matches for kind \"Elasticsearch\" in version \"logging.openshift.io/v1\""}} $ oc logs $(oc get pod -l name=cluster-logging-operator -o name) |grep -c "Failure deleting elasticsearch elasticsearch CR" 174
Version-Release number of selected component (if applicable):
$ oc get csv NAME DISPLAY VERSION REPLACES PHASE cluster-logging.v5.6.3 Red Hat OpenShift Logging 5.6.3 cluster-logging.v5.6.2 Succeeded
How reproducible:
Always
Steps to Reproduce:
1. Deploy CLO using channel stable-5.6 without deploying EO since the internal Elasticsearch won't be used
$ oc get csv NAME DISPLAY VERSION REPLACES PHASE cluster-logging.v5.6.3 Red Hat OpenShift Logging 5.6.3 cluster-logging.v5.6.2 Succeeded
2. Create the CLO CR defining only the collector
$ cat clo-instance-only-collector.yaml apiVersion: "logging.openshift.io/v1" kind: "ClusterLogging" metadata: name: "instance" namespace: "openshift-logging" spec: managementState: "Managed" collection: logs: type: "fluentd" fluentd: resources: {}
3. Check the logs of the CLO operator pod where visible always a error message trying to delete the Elasticsearch CR
$ oc logs $(oc get pod -l name=cluster-logging-operator -o name) |grep "Failure deleting elasticsearch elasticsearch CR" |head -1 {"_ts":"2023-03-13T09:13:10.794416893Z","_level":"0","_component":"cluster-logging-operator","_message":"Error removing component","_error":{"msg":"Failure deleting elasticsearch elasticsearch CR for \"instance\": no matches for kind \"Elasticsearch\" in version \"logging.openshift.io/v1\""}} $ oc logs $(oc get pod -l name=cluster-logging-operator -o name) |grep -c "Failure deleting elasticsearch elasticsearch CR" 174
{}Workaround{}:
Create the Elasticsearch CR until a fix is available:
$ oc create -f https://raw.githubusercontent.com/openshift/elasticsearch-operator/release-5.6/bundle/manifests/logging.openshift.io_elasticsearches.yaml
Review that not more "Failure deleting elasticsearch elasticsearch CR" visible in the clusterLogging Operator pod after applying the workaround:
oc logs $(oc get pod -l name=cluster-logging-operator -o name) |grep "Failure deleting elasticsearch elasticsearch CR" |head -1
Actual results:
ClusterLogging operator pod returning continually the error deleting the Elasticsearch CR
Expected results:
No errors visible in the clusterLogging Operator deleting the Elasticsearch CR since it's not expected to be installed because the logs are only forwarded outside and not used the internal Elasticsearch