Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-25164

4.15 server does not have PodMetrics/NodeMetrics

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • 4.16.0
    • 4.15.0
    • Monitoring
    • Moderate
    • No
    • MON Sprint 246, MON Sprint 251
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the `oc get podmetrics` and `oc get nodemetrics` commands were not working properly. This update fixes the issue. (link:https://issues.redhat.com/browse/OCPBUGS-25164[*OCPBUGS-25164*])
      Show
      * Previously, the `oc get podmetrics` and `oc get nodemetrics` commands were not working properly. This update fixes the issue. (link: https://issues.redhat.com/browse/OCPBUGS-25164 [* OCPBUGS-25164 *])
    • Bug Fix
    • Done

      Description of problem:

      checked with 4.15.0-0.nightly-2023-12-11-033133, there are not PodMetrics/NodeMetrics in server

      $ oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.15.0-0.nightly-2023-12-11-033133   True        False         122m    Cluster version is 4.15.0-0.nightly-2023-12-11-033133
      
      $ oc api-resources | grep -i metrics
      nodes                                                                                                                        metrics.k8s.io/v1beta1                        false        NodeMetrics
      pods                                                                                                                         metrics.k8s.io/v1beta1                        true         PodMetrics
      
      $ oc explain PodMetrics
      the server doesn't have a resource type "PodMetrics"
      $ oc explain NodeMetrics
      the server doesn't have a resource type "NodeMetrics"
      
      $ oc get NodeMetrics
      error: the server doesn't have a resource type "NodeMetrics"
      $ oc get PodMetrics -A
      error: the server doesn't have a resource type "PodMetrics"

      no issue with 4.14.0-0.nightly-2023-12-11-135902

      $ oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.14.0-0.nightly-2023-12-11-135902   True        False         88m     Cluster version is 4.14.0-0.nightly-2023-12-11-135902
      
      $ oc api-resources | grep -i metrics
      nodes                                                                                                                        metrics.k8s.io/v1beta1                        false        NodeMetrics
      pods                                                                                                                         metrics.k8s.io/v1beta1                        true         PodMetrics
      
      $ oc explain PodMetrics
      GROUP:      metrics.k8s.io
      KIND:       PodMetrics
      VERSION:    v1beta1DESCRIPTION:
          PodMetrics sets resource usage metrics of a pod.
      ...
      
      $ oc explain NodeMetrics
      GROUP:      metrics.k8s.io
      KIND:       NodeMetrics
      VERSION:    v1beta1DESCRIPTION:
          NodeMetrics sets resource usage metrics of a node.
      ...
      
      $ oc get PodMetrics -A
      NAMESPACE                                          NAME                                                                       CPU    MEMORY      WINDOW
      openshift-apiserver                                apiserver-65f777466-4m8nj                                                  9m     297512Ki    5m0s
      openshift-apiserver                                apiserver-65f777466-g7n72                                                  10m    313308Ki    5m0s
      openshift-apiserver                                apiserver-65f777466-xzd8l                                                  12m    293008Ki    5m0s
      openshift-apiserver-operator                       openshift-apiserver-operator-54945b8bbd-bxkcj                              3m     119264Ki    5m0s
      ...
      
      $ oc get NodeMetrics
      NAME                                        CPU     MEMORY      WINDOW
      ip-10-0-20-163.us-east-2.compute.internal   765m    8349848Ki   5m0s
      ip-10-0-22-189.us-east-2.compute.internal   388m    5363132Ki   5m0s
      ip-10-0-41-231.us-east-2.compute.internal   1274m   7243548Ki   5m0s
      ... 

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

      4.15.0-0.nightly-2023-12-11-033133

      How reproducible:

      always

      Steps to Reproduce:

      1. see the description

      Actual results:

      4.15 server does not have PodMetrics/NodeMetrics

      Expected results:

      should have

            janantha@redhat.com Jayapriya Pai
            juzhao@redhat.com Junqi Zhao
            Junqi Zhao Junqi Zhao
            Eliska Romanova Eliska Romanova
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: