Bug 1862194 - [4.5] Result for kubelet_running_pod_count is wrong
Summary: [4.5] Result for kubelet_running_pod_count is wrong
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.5.z
Assignee: Seth Jennings
QA Contact: Sunil Choudhary
Depends On: 1861631
Blocks: 1862195
TreeView+ depends on / blocked
Reported: 2020-07-30 17:13 UTC by Seth Jennings
Modified: 2020-09-08 10:54 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1861631
Last Closed: 2020-09-08 10:54:03 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github openshift origin pull 25359 None closed [release-4.5] Bug 1862194: UPSTREAM: 85983: fix metrics kubelet_running_pod_count 2020-09-11 14:28:15 UTC
Red Hat Product Errata RHBA-2020:3510 None None None 2020-09-08 10:54:35 UTC

Comment 1 Seth Jennings 2020-07-30 17:15:03 UTC
4.6 PR https://github.com/openshift/kubernetes/pull/303

Comment 2 Seth Jennings 2020-08-10 19:57:58 UTC
upstream PR https://github.com/openshift/origin/pull/25359

Comment 6 Sunil Choudhary 2020-08-24 12:20:32 UTC
Verified on 4.5.0-0.nightly-2020-08-23-191713

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.5.0-0.nightly-2020-08-23-191713   True        False         7m35s   Cluster version is 4.5.0-0.nightly-2020-08-23-191713

$ oc get nodes
NAME                                         STATUS   ROLES    AGE   VERSION
ip-10-0-129-19.us-east-2.compute.internal    Ready    worker   50m   v1.18.3+0bec244
ip-10-0-130-91.us-east-2.compute.internal    Ready    master   62m   v1.18.3+0bec244
ip-10-0-161-169.us-east-2.compute.internal   Ready    worker   50m   v1.18.3+0bec244
ip-10-0-185-109.us-east-2.compute.internal   Ready    master   62m   v1.18.3+0bec244
ip-10-0-217-219.us-east-2.compute.internal   Ready    worker   50m   v1.18.3+0bec244
ip-10-0-220-213.us-east-2.compute.internal   Ready    master   62m   v1.18.3+0bec244

$ oc get pod --all-namespaces -o wide | grep "ip-10-0-130-91.us-east-2.compute.internal" | grep Running |  wc -l

$ oc get pod --all-namespaces -o wide | grep "ip-10-0-130-91.us-east-2.compute.internal" | grep Completed |  wc -l

$ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -g -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=kubelet_running_pod_count{node="ip-10-0-130-91.us-east-2.compute.internal"}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   341  100   341    0     0   8881      0 --:--:-- --:--:-- --:--:--  8973
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
        "metric": {
          "__name__": "kubelet_running_pod_count",
          "endpoint": "https-metrics",
          "instance": "",
          "job": "kubelet",
          "metrics_path": "/metrics",
          "namespace": "kube-system",
          "node": "ip-10-0-130-91.us-east-2.compute.internal",
          "service": "kubelet"
        "value": [

Comment 8 errata-xmlrpc 2020-09-08 10:54:03 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 (OpenShift Container Platform 4.5.8 bug fix 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.


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