Bug 1954937 - [API-1009] `oc get apirequestcount` shows blank for column REQUESTSINCURRENTHOUR
Summary: [API-1009] `oc get apirequestcount` shows blank for column REQUESTSINCURRENTHOUR
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: kube-apiserver
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.8.0
Assignee: David Eads
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-29 06:37 UTC by Xingxing Xia
Modified: 2021-07-27 23:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:04:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift api pull 917 0 None open bug 1954937: fix the oc get output for apirequestcounts 2021-04-30 14:11:44 UTC
Github openshift cluster-kube-apiserver-operator pull 1123 0 None open bug 1954937: update printer columns for apirequestcounts 2021-04-30 14:14:45 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:05:04 UTC

Description Xingxing Xia 2021-04-29 06:37:43 UTC
Description of problem:
`oc get apirequestcount` shows blank for column REQUESTSINCURRENTHOUR

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-28-005607

How reproducible:
Always

Steps to Reproduce:
1. oc get apirequestcount
NAME                                                                       REMOVEDINRELEASE   REQUESTSINCURRENTHOUR   REQUESTSINLAST24H
alertmanagerconfigs.v1alpha1.monitoring.coreos.com                         2.0                                        9133
alertmanagers.v1.monitoring.coreos.com                                     2.0                                        2850
apirequestcounts.v1.apiserver.openshift.io                                 2.0                                        274683
apiservers.v1.config.openshift.io                                          2.0                                        12716
...

But checking them, the "currentHour" is not blank:
$ oc get apirequestcount alertmanagerconfigs.v1alpha1.monitoring.coreos.com -o jsonpath='{.status.currentHour.requestCount}'
73

Actual results:
1. As said above

Expected results:
1. REQUESTSINCURRENTHOUR should not be blank in oc get.

Additional info:
The cause is, https://github.com/openshift/cluster-kube-apiserver-operator/blob/master/vendor/github.com/openshift/api/apiserver/v1/apiserver.openshift.io_apirequestcount.yaml#L30 :
    - name: RequestsInCurrentHour
      type: integer
      description: Number of requests in the last hour.
      jsonPath: .status.requestsInTheCurrentHour.requestCount

$ oc explain apirequestcount.status.requestsInTheCurrentHour
error: field "requestsInTheCurrentHour" does not exist

Should correct it to be: .status.currentHour.requestCount

Comment 2 Xingxing Xia 2021-05-06 06:18:30 UTC
Tested in 4.8.0-0.nightly-2021-05-06-003426, now REQUESTSINCURRENTHOUR is correctly shown:
$ oc get apirequestcount
NAME                                                                       REMOVEDINRELEASE   REQUESTSINCURRENTHOUR   REQUESTSINLAST24H
alertmanagerconfigs.v1alpha1.monitoring.coreos.com                                            77                      2394
alertmanagers.v1.monitoring.coreos.com                                                        23                      412
apirequestcounts.v1.apiserver.openshift.io                                                    3149                    58450
apiservers.v1.config.openshift.io                                                             129                     2598
apiservices.v1.apiregistration.k8s.io                                                         1057                    16836
authentications.v1.config.openshift.io                                                        73                      1204
...<snipped>...

$ oc get apirequestcount -o jsonpath='{.items[*].status.currentHour.requestCount}'
77 23 3149 129 1057 73 ...<snipped>...

Comment 5 errata-xmlrpc 2021-07-27 23:04:50 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


Note You need to log in before you can comment on or make changes to this bug.