mapi_current_pending_csr metric is always set to 1 in OpenShift Container Platform 4.8

Solution Verified - Updated -

Issue

  • After installing or updating to OCP 4.8 it was found that mapi_current_pending_csr metric from openshift-cluster-machine-approver is always reporting one, even though no pending CSR is reported:

    $ oc get clusterversion
    NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
    version   4.8.12    True        False         43h     Cluster version is 4.8.12
    
    $ oc get csr
    No resources found
    
    $ oc exec -c machine-approver-controller machine-approver-XXXXXXXX-XXXXX -- curl -H "Authorization: Bearer XXXXXX" -k https://localhost:9192/metrics | grep mapi_current_pending_csr
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0# HELP mapi_current_pending_csr Count of pending CSRs at the cluster level
    # TYPE mapi_current_pending_csr gauge
    mapi_current_pending_csr 1
    
  • Why is mapi_current_pending_csr constantly reporting 1, even though there is no pending CSR?

Environment

  • Red Hat OpenShift Container Platform (OCP) 4.8 and 4.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content