Bug 1942557

Summary: Query is reporting "no datapoint" when label cluster="" is set but work when the label is removed or when running directly in Prometheus
Product: OpenShift Container Platform Reporter: Simon Reber <sreber>
Component: Dev ConsoleAssignee: Vikram Raj <viraj>
Status: CLOSED ERRATA QA Contact: Gajanan More <gamore>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: aos-bugs, kjeeyar, nmukherj, viraj
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:55:12 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: 1948369    

Description Simon Reber 2021-03-24 14:36:31 UTC
Description of problem:

When running any of the pre-defined Metrics queries in OpenShift Developer Console, https://<cluster-url>/dev-monitoring/ns/project-X/metrics the user is reporting "no datapoing found".

For example when running the "CPU Usage" query which is running `sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster="", namespace='<%= namespace %>'}) by (pod)` it will report back "no datapoint found".

When running the same in Prometheus we see all the data expected.

Once re-running the query in the Developer Console but removing `cluster=""` it also works there and shows the data as expected. Meaning the query like `sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace='<%= namespace %>'}) by (pod)` works.

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

 - OpenShift Container Platform 4.5.23 and 4.6.21

How reproducible:

 - N/A


Steps to Reproduce:
1. N/A

Actual results:

The user is seeing "no datapoints found" message but in fact the datapoints are there when removing `cluster=""` from the query.

Expected results:

The user should be able to see all data points without the need to modify the pre-defined queries.

Additional info:

The question is a bit, why the label `cluster=""` is set on most of the pre-defined queries as currently it does not appear to make sense to have it there. And why it could cause the Console to report back "no datapoints" even though there are datapoints available.

Comment 5 Karthik Jeeyar 2021-04-12 06:12:10 UTC
Verified on 4.8.0-0.nightly-2021-04-09-222447

Comment 8 errata-xmlrpc 2021-07-27 22:55:12 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438