Bug 1911212

Summary: [MSTR-998] API Performance Dashboard "Period" drop-down has a choice "$__auto_interval_period" which can bring "1:154: parse error: missing unit character in duration"
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: Management ConsoleAssignee: Andrew Pickering <anpicker>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: akashem, aos-bugs, jokerman, mfojtik, xxia
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:49:10 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
Period selection has a "$__auto_interval_period" which brings page error none

Description Xingxing Xia 2020-12-28 07:40:42 UTC
Created attachment 1742518 [details]
Period selection has a "$__auto_interval_period" which brings page error

Description of problem:
API Performance Dashboard "Period" drop-down has a choice "$__auto_interval_period" which can bring "1:154: parse error: missing unit character in duration"

4.7.0-0.nightly-2020-12-21-131655

How reproducible:
Always

Steps to Reproduce:
1. Login to management console via kubeadmin, navigate Monitoring --> Dashboards.
In the Dashboard drop-down list, select “API Performance”.

2. Click "Period" drop-down

Actual results:
2. There is a selection choice: "$__auto_interval_period". Click it, the page shows, see screenshot later:
! An error occurred
1:154: parse error: missing unit character in duration

Expected results:
2. Any selection choice of the drop-down list should be clicked validly without error.

Additional info:

Comment 1 Abu Kashem 2021-01-04 20:15:34 UTC
Hi xxia,
This is most likely an issue with the console dashboard rendering logic. It may not support "auto interval period". Can you please get it verified by the console qe team? 

If "auto interval period" is not supported then I am happy to remove the auto option from the "period" variable.

Comment 2 Xingxing Xia 2021-01-05 01:50:27 UTC
OK, moving to Management Console component. Sorry for the trouble.

Comment 3 Jakub Hadvig 2021-01-05 12:44:56 UTC
Andy could you please take a look on this issue and do a further triage if needed. Thanks

Comment 4 Abu Kashem 2021-01-05 18:32:17 UTC
> OK, moving to Management Console component. Sorry for the trouble.

xxia, thanks for the thorough testing!

Comment 5 Andrew Pickering 2021-01-13 12:02:18 UTC
I've opened https://github.com/openshift/console/pull/7823 which adds basic support for `$__auto_interval_*` variables by treating them as being the same as `$__interval`.

Comment 7 Xingxing Xia 2021-01-15 08:20:04 UTC
Tested 4.7.0-0.nightly-2021-01-14-211319, the error is gone. Select Time Range of 6 hours, select Period of $__auto_interval_period, per the PR, it should be 12m. Look at the graph "api request duration by verb - 99th quantile", it should correspond to below query:
histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{apiserver="kube-apiserver",subresource!="log",verb!~"WATCH|WATCHLIST|PROXY"}[12m])) by(verb,le))

In Prometheus UI, do this query with 720 resolutions, then compare Prometheus UI's graph, same as web console's. This proves the PR.

Comment 10 errata-xmlrpc 2021-02-24 15:49:10 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.7.0 security, bug fix, and enhancement 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-2020:5633