Bug 1827063

Summary: Failed to create or get service for metrics: services is forbidden: cannot set blockOwnerDeletion in elasticsearch-operator
Product: OpenShift Container Platform Reporter: Periklis Tsirakidis <periklis>
Component: LoggingAssignee: Periklis Tsirakidis <periklis>
Status: CLOSED ERRATA QA Contact: Qiaoling Tang <qitang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: aos-bugs, qitang, scuppett
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:30:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Periklis Tsirakidis 2020-04-23 07:40:46 UTC
This bug was initially created as a copy of Bug #1817097

I am copying this bug because: 



[Description of problem]

Deploying cluster logging following the documentation [1] step by step, in the cluster-logging-operator pod and the elasticsearch-operator pod is possible to read the next error:

Elasticsearch-operator:

~~~
$ oc -n openshift-operators-redhat logs elasticsearch-operator-59d8d6b6cc-d7zxh |grep blockOwnerDeletion 
{"level":"info","ts":1585135974.742253,"logger":"cmd","msg":"failed to create or get service for metrics: services \"elasticsearch-operator\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
~~~

Cluster-logging-operator:

~~~
$ oc -n openshift-logging logs cluster-logging-operator-74886fbcf9-jtgjb |grep blockOwnerDeletion
{"level":"info","ts":1585134774.0195408,"logger":"cmd","msg":"failed to create or get service for metrics: services \"cluster-logging-operator\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
~~~

[Version-Release number of selected component (if applicable)]

$ oc version
Client Version: 4.3.5
Server Version: 4.3.5
Kubernetes Version: v1.16.2

[How reproducible]
Always

[Steps to Reproduce]
Follow the Deploying cluster logging documentation step by step [1]

[Actual results]
Elasticsearch-operator and cluster-logging-operator give the error:


Elasticsearch-operator:

~~~
$ oc -n openshift-operators-redhat logs elasticsearch-operator-59d8d6b6cc-d7zxh |grep blockOwnerDeletion 
{"level":"info","ts":1585135974.742253,"logger":"cmd","msg":"failed to create or get service for metrics: services \"elasticsearch-operator\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
~~~

Cluster-logging-operator:

~~~
$ oc -n openshift-logging logs cluster-logging-operator-74886fbcf9-jtgjb |grep blockOwnerDeletion
{"level":"info","ts":1585134774.0195408,"logger":"cmd","msg":"failed to create or get service for metrics: services \"cluster-logging-operator\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
~~~


[Expected results]

Not error showed.



[1] https://docs.openshift.com/container-platform/4.3/logging/cluster-logging-deploying.html

Comment 4 Qiaoling Tang 2020-04-26 01:19:22 UTC
Verified with images from 4.5.0-0.ci-2020-04-25-151430.

@Periklis,

I have a question: will we expose some metrics of the CLO and EO? I can see the svc has been exposed, but I can't find the metrics of the CLO and EO.

$ oc get svc -n openshift-operators-redhat
NAME                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
elasticsearch-operator   ClusterIP   172.30.195.114   <none>        8383/TCP   12m

$ oc get svc
NAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)     AGE
cluster-logging-operator   ClusterIP   172.30.138.202   <none>        8383/TCP    17m

Comment 5 Periklis Tsirakidis 2020-04-27 08:52:49 UTC
@Qiaoling Tang

We don't provide any metrics for both operators, yet.

Comment 6 errata-xmlrpc 2020-07-13 17:30:33 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, 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