Bug 1685807

Summary: [3.11]Sometimes meet "many-to-many matching not allowed: matching labels must be unique on one side" warn info in prometheus-k8s pod
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Lili Cosic <lcosic>
Status: CLOSED WONTFIX QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 3.11.0CC: erooth, hongkliu, minden, mloibl, surbania
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-17 13:41:16 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:
Attachments:
Description Flags
"many-to-many matching not allowed: matching labels must be unique on one side" warn info in prometheus-k8s pod
none
environment info none

Description Junqi Zhao 2019-03-06 07:18:46 UTC
Created attachment 1541234 [details]
"many-to-many matching not allowed: matching labels must be unique on one side" warn info in prometheus-k8s pod

Description of problem:
Sometimes meet "many-to-many matching not allowed: matching labels must be unique on one side" warn info in prometheus-k8s pod, eg:
oc -n openshift-monitoring logs prometheus-k8s-1 -c prometheus | grep "Evaluating rule failed"
level=warn ts=2019-03-06T06:20:25.743554993Z caller=manager.go:343 component="rule manager" group=k8s.rules msg="Evaluating rule failed" rule="record: namespace_name:container_cpu_usage_seconds_total:sum_rate\nexpr: sum by(namespace, label_name) (sum by(namespace, pod_name) (rate(container_cpu_usage_seconds_total{container_name!=\"\",image!=\"\",job=\"kubelet\"}[5m]))\n  * on(namespace, pod_name) group_left(label_name) label_replace(kube_pod_labels{job=\"kube-state-metrics\"},\n  \"pod_name\", \"$1\", \"pod\", \"(.*)\"))\n" err="many-to-many matching not allowed: matching labels must be unique on one side"
level=warn ts=2019-03-06T06:20:25.779452969Z caller=manager.go:343 component="rule manager" group=k8s.rules msg="Evaluating rule failed" rule="record: namespace_name:container_memory_usage_bytes:sum\nexpr: sum by(namespace, label_name) (sum by(pod_name, namespace) (container_memory_usage_bytes{container_name!=\"\",image!=\"\",job=\"kubelet\"})\n  * on(namespace, pod_name) group_left(label_name) label_replace(kube_pod_labels{job=\"kube-state-metrics\"},\n  \"pod_name\", \"$1\", \"pod\", \"(.*)\"))\n" err="many-to-many matching not allowed: matching labels must be unique on one side"
level=warn ts=2019-03-06T06:20:25.782227903Z caller=manager.go:343 component="rule manager" group=k8s.rules msg="Evaluating rule failed" rule="record: namespace_name:kube_pod_container_resource_requests_memory_bytes:sum\nexpr: sum by(namespace, label_name) (sum by(namespace, pod) (kube_pod_container_resource_requests_memory_bytes{job=\"kube-state-metrics\"})\n  * on(namespace, pod) group_left(label_name) label_replace(kube_pod_labels{job=\"kube-state-metrics\"},\n  \"pod_name\", \"$1\", \"pod\", \"(.*)\"))\n" err="many-to-many matching not allowed: matching labels must be unique on one side"

Version-Release number of selected component (if applicable):
oc v3.11.88
monitoring images v3.11.88

How reproducible:
Sometimes

Steps to Reproduce:
1. # oc -n openshift-monitoring logs prometheus-k8s-1 -c prometheus | grep "Evaluating rule failed"
2.
3.

Actual results:
"many-to-many matching not allowed: matching labels must be unique on one side" warn info in prometheus-k8s pod

Expected results:


Additional info:
This warn info is not always happen, and it does not affect function now

Comment 4 Junqi Zhao 2019-03-07 11:14:33 UTC
Based on Comment 3, close it as NOTABUG

Comment 7 Junqi Zhao 2019-08-07 11:33:21 UTC
Created attachment 1601348 [details]
environment info

see the files in prometheus/logs/