Bug 1908342

Summary: The new pv_collector_total_pv_count is not reported via telemetry
Product: OpenShift Container Platform Reporter: Tomas Smetana <tsmetana>
Component: StorageAssignee: Tomas Smetana <tsmetana>
Storage sub component: Storage QA Contact: Wei Duan <wduan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: aos-bugs
Version: 4.7   
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:45:05 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:

Description Tomas Smetana 2020-12-16 13:19:41 UTC
There is a new metric in kubernetes 1.20: pv_collector_total_pv_count added via https://github.com/kubernetes/kubernetes/pull/95719. The plugin_name and volume_mode should be collected via telemetry in order to provide overview of the cluster storage usage.

Comment 3 Wei Duan 2020-12-22 07:24:17 UTC
Verified pass on 4.7.0-0.nightly-2020-12-20-031835

$ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=vsphere_cluster_check_total' | jq

{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum",
          "plugin_name": "kubernetes.io/cinder",
          "volume_mode": "Block"
        },
        "value": [
          1608532399.396,
          "1"
        ]
      },
      {
        "metric": {
          "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum",
          "plugin_name": "kubernetes.io/cinder",
          "volume_mode": "Filesystem"
        },
        "value": [
          1608532399.396,
          "2"
        ]
      },
      {
        "metric": {oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=vsphere_cluster_check_total' | jq

{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum",
          "plugin_name": "kubernetes.io/cinder",
          "volume_mode": "Block"
        },
        "value": [
          1608532399.396,
          "1"
        ]
      
          "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum",
          "plugin_name": "kubernetes.io/csi:cinder.csi.openstack.org",
          "volume_mode": "Block"
        },
        "value": [
          1608532399.396,
          "2"
        ]
      },
      {
        "metric": {
          "__name__": "cluster:kube_persistentvolume_plugin_type_counts:sum",
          "plugin_name": "kubernetes.io/csi:cinder.csi.openstack.org",
          "volume_mode": "Filesystem"
        },
        "value": [
          1608532399.396,
          "2"
        ]
      }
    ]
  }
}

Comment 5 errata-xmlrpc 2021-02-24 15:45:05 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