Bug 2094095

Summary: Integration with Jaeger fails for ServiceMonitor
Product: OpenShift Container Platform Reporter: iwatson
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED DEFERRED QA Contact: Anping Li <anli>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.10CC: periklis
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-07 08:23:35 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:

Description iwatson 2022-06-06 20:04:06 UTC
Description of problem:

A user creates a Jaeger CR with strategy production. This in turn creates a Elastic search CR. The elastic search CR creates a service monitor.

The service monitor does not work in this situation.

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

Elasticsearch / logging 5.4.1-24 
Jaeger 1.30.2
OCP 4.10.13

How reproducible: 100%

Steps to Reproduce:
1. Enable user-workload-monitoring
2. Create a Jaeger CR as attached
3. oc get servicemonitor -o yaml
4. Observe the matchLabels are incorrect
5. Observe the prometheus-operator user-workload-monitoring pod and error of level=warn ts=<timestamp> caller=operator.go:1832 component=prometheusoperatormsg="skipping servicemonitor" error"it accesses file system via bearer token file which Prometheus specification prohibits" servicemonitor=<namespace>/<name> namespace=openshift-user-workload-monitoring prometheus=user-workload

Additional info:

Jaeger creates the elastic search CR here and sets the following labels https://github.com/jaegertracing/jaeger-operator/blob/1a76367a3771c96806309a071ca0ef72d95796e9/pkg/storage/elasticsearch.go#L177-L188

Elastic search uses these labels to create its service monitor here https://github.com/openshift/elasticsearch-operator/blob/805a01044c26dda35b7ef84c3034247e24e886b8/internal/elasticsearch/service_monitor.go#L54

Either the elastic search pods require additional labels or the service monitor needs less.

Comment 3 Red Hat Bugzilla 2023-09-15 01:55:36 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days