Skip to content

Kubelet kubelet_volume_stats_* wrong metrics values under cri-o #254

@atillaqb

Description

@atillaqb

Describe the bug: CSI Driver reporting wrong prometheus metrics to the Kubelet

Image
Capacity of the all volumes: 88 GB (when I created PVC only for 1Gb volume).

df -h
Filesystem                  Size  Used Avail Use% Mounted on
devtmpfs                     12G     0   12G   0% /dev
tmpfs                        12G  376K   12G   1% /dev/shm
tmpfs                        12G   12M   12G   1% /run
tmpfs                        12G     0   12G   0% /sys/fs/cgroup
/dev/mapper/ocivolume-root   89G   58G   32G  65% /

Most likely CSI driver using values for the metrics:

  • kubelet_volume_stats_used_bytes
  • kubelet_volume_stats_capacity_bytes
  • kubelet_volume_* family

From the host directly. It is not calculating the size of the folders, used for the PV.

Expected behaviour: True size of the Volumes based on the size of the Hostpath folder used to provision volume. Is it possible?

Steps to reproduce the bug:

  1. Install Kubernetes on the OKE worker node.
  2. Install openebs from the helm chart
  3. Use openebs-hostpath in the storageclass of the PVC.

The output of the following commands will help us better understand what's going on:

  • kubectl get pods -n <openebs_namespace> --show-labels :
app=localpv-provisioner,chart=localpv-provisioner-4.2.0,component=localpv-provisioner,heritage=Helm,name=openebs-localpv-provisioner,openebs.io/component-name=openebs-localpv-provisioner,pod-template-hash=6455c4d767,release=openebs

Anything else we need to know?:
Add any other context about the problem here.

Environment details:

  • OpenEBS version (use kubectl get po -n openebs --show-labels): localpv-provisioner,chart=localpv-provisioner-4.2.0
  • Kubernetes version (use kubectl version): 1.31.1
  • Cloud provider or hardware configuration: OCI OKE self managed
  • OS (e.g: cat /etc/os-release): Oracle Linux 8.10
  • kernel (e.g: uname -a): 5.15.0-207.156.6.el8uek.x86_64
  • others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions