Bug 1808394
Summary: | monitoring/query-browser doesn't honor order of returned metrics | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Aditya Konarde <akonarde> | ||||||||
Component: | Management Console | Assignee: | Robb Hamilton <rhamilto> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> | ||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | unspecified | ||||||||||
Version: | 4.3.0 | CC: | anpicker, aos-bugs, jokerman, yapei | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | 4.5.0 | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: |
Cause: The query browser results are rendered with a hard-coded sort.
Consequence: The hard-coded sort can override the sort specified in the query, thus rendering a different result than requested.
Fix: Remove the hard-coded sort so the sort specified in the query is preserved.
Result: The results reflect the sort specified in the query.
|
Story Points: | --- | ||||||||
Clone Of: | |||||||||||
: | 1808437 (view as bug list) | Environment: | |||||||||
Last Closed: | 2020-07-13 17:22:21 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: | 1808437 | ||||||||||
Attachments: |
|
This bug appears to be the result of the fact that the console manipulates the data for display purposes. By comparison, Prometheus simply displays the data as it is returned. Further, the console allows the user to change the sort column and sort direction via the table column headers (Prometheus does not), which provides another opportunity for the data display to differ from the query. Andy, can you shed light on the reasoning for the differences between the console implementation and that of Prometheus? It seems the simplest approach to fixing the bug is to simply follow what Prometheus does (display the data exactly as it is returned). Try to run this query `sort_desc(topk(100,sum(pod:container_cpu_usage:sum)by(namespace)))` in prometheus and openshift console Monitoring -> Metrics console just show the data as it is returned(in prometheus UI, when use sort_desc function, data returned is in order), user can sort data by Namespace & Value anyway. Verified on 4.5.0-0.ci-2020-03-04-223611 Created attachment 1668027 [details]
Data in Prometheus
Created attachment 1668028 [details]
Data in Console
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 |
Created attachment 1666379 [details] Example query against the metrics browser Description of problem: The query browser UI on the OpenShift console doesn't honor the order of returned metrics. Version-Release number of selected component (if applicable): OpenShift 4.3.0 How reproducible: Always Steps to Reproduce: 1.Go to the Monitoring query browser on the OpenShift console 2.Run a query that includes sorting, for example use the sort_desc function (see attachment) Actual results: The returned list of metrics is not sorted Expected results: If using a query where the order of returned metrics makes sense, the returned list of metrics should be sorted accordingly