Bug 1985965

Summary: oVirt CSI driver does not report volume stats
Product: OpenShift Container Platform Reporter: Jan Safranek <jsafrane>
Component: StorageAssignee: Vojtech Juranek <vjuranek>
Storage sub component: oVirt CSI Driver QA Contact: michal <mgold>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, emarcus, mburman, mdhanve, rbednar, rpalathi
Version: 4.8   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
With this enhancement, the oVirt CSI driver now supports GET_VOLUME_STATS capability and provides information about amount of used space on the volume. This information is displayed in the PVC list and PVC details under the Used column.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:04:47 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 Jan Safranek 2021-07-26 11:36:41 UTC
oVirt CSI driver does not support GET_VOLUME_STATS capability / NodeGetVolumeStats call.

Implementation of the capability is usually simple (one stat() call) and it allows users and cluster admins to see metrics of used / free space on their volumes and create alerts when they run out of space.

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

How reproducible:
always

Steps to Reproduce:
1. On oVirt, create a PVC + some app that uses it (i.e. run a Pod with the PVC)
2. Check PersistentVolumeClaims in the console (as admin, Storage -> PersistentVolumeClaims)

Actual results:
"Used" column is empty

Expected results:
"Used" column contains amount of used space on the volume. Note that the metric has some delay, wait for a few minutes to get the data. And a Pod that uses the volume must be running - the volume must be mounted for kubelet to be able to get the used/free space.

Btw, this is more or less a feature request, but a really simple one to implement.

Comment 6 Michael Burman 2021-10-19 07:01:32 UTC
rhv: 4.4.8.5-0.4

ocp:4.10.0-0.nightly-2021-10-14-061552

scenario:
1) create pvc
2) create pod under this pvc
3) open console ui https://console-openshift-consolexxx/k8s/all-namespaces/persistentvolumeclaims
4) as admin, go to Storage -> PersistentVolumeClaims
5) verify that 'used' column with value
6) inside the pod you can run df -h to see how much used is there 
7) create another big file
8) verify that the value in the used column was updated

Comment 11 errata-xmlrpc 2022-03-10 16:04:47 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.10.3 security 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-2022:0056