Bug 2248015

Summary: used-bytes value from virsh guestinfo for fedora/rhel vm remains the same after download large file
Product: Container Native Virtualization (CNV) Reporter: Ahmad <ahafe>
Component: NetworkingAssignee: Petr Horáček <phoracek>
Status: CLOSED MIGRATED QA Contact: Nir Rozen <nrozen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.15.5CC: kmajcher
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 13:30:17 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 Ahmad 2023-11-05 14:10:10 UTC
Description of problem:

'used-bytes' value from 'virsh guestinfo' remains the same after downloading large file in fedora/rhel vm's
for Centos it works as expected, other OS do not work as expected



Version cnv-4.15:


How reproducible: 100% for fedora/rhel 


Steps to Reproduce:
===============Centos Vm=============================

1) create a centos vm

2) connect  to the virt-launcher pod of the  centos vm by running following command:
     oc rsh virt-launcher-centos-stream9-ruling-mammal-vvpwz

3)  run command "virsh guestinfo 1 --filesystem" inside of virt-launcher pod
sh-5.1$ virsh guestinfo 1 --filesystem
Authorization not available. Check if polkit service is running or see debug message for more information.
fs.count            : 1
fs.0.name           : vda1
fs.0.mountpoint     : /
fs.0.fstype         : xfs
fs.0.total-bytes    : 32144076800
fs.0.used-bytes     : 2503639040
fs.0.disk.count     : 1
fs.0.disk.0.alias   : vda
fs.0.disk.0.device  : /dev/vda1

4) download a large file from inside the vm:
(connect to the vm) virtctl console centos-stream9-ruling-mammal 
     wget http://mirror.ufs.ac.za/linuxmint/stable/14/linuxmint-14-kde-dvd-64bit.iso

5) run command "virsh guestinfo 1 --filesystem"  inside of virt-launcher pod

sh-5.1$ virsh guestinfo 1 --filesystem
Authorization not available. Check if polkit service is running or see debug message for more information.
fs.count            : 1
fs.0.name           : vda1
fs.0.mountpoint     : /
fs.0.fstype         : xfs
fs.0.total-bytes    : 32144076800
fs.0.used-bytes     : 3599400960
fs.0.disk.count     : 1
fs.0.disk.0.alias   : vda
fs.0.disk.0.device  : /dev/vda1

we can see both values increased for 'fs.0.used-bytes'

==========================Fedora VM ===================================

1) create fedora/rhel vm 
2) connect to   the virt-launcher pod of the fedora/rhel vm:
    oc rsh virt-launcher-vm-fedora-cpu-mem-1-wzbrx

3)  run command "virsh guestinfo 1 --filesystem" inside of virt-launcher pod:
virsh guestinfo 1 --filesystem
Authorization not available. Check if polkit service is running or see debug message for more information.
fs.count            : 2
fs.0.name           : vda2
fs.0.mountpoint     : /boot
fs.0.fstype         : ext4
fs.0.total-bytes    : 943562752
fs.0.used-bytes     : 117858304
fs.0.disk.count     : 1
fs.0.disk.0.alias   : vda
fs.0.disk.0.device  : /dev/vda2
fs.1.name           : vda3
fs.1.mountpoint     : /boot/efi
fs.1.fstype         : vfat
fs.1.total-bytes    : 104607744
fs.1.used-bytes     : 12107776
fs.1.disk.count     : 1
fs.1.disk.0.alias   : vda
fs.1.disk.0.device  : /dev/vda3

4) download a large file inside the vm
(connect to the vm) virtctl console vm-fedora-cpu-mem-1: 
     wget http://mirror.ufs.ac.za/linuxmint/stable/14/linuxmint-14-kde-dvd-64bit.iso

5) run command "virsh guestinfo 1 --filesystem" inside of virt-launcher pod
sh-5.1$ virsh guestinfo 1 --filesystem
Authorization not available. Check if polkit service is running or see debug message for more information.
fs.count            : 2
fs.0.name           : vda2
fs.0.mountpoint     : /boot
fs.0.fstype         : ext4
fs.0.total-bytes    : 943562752
fs.0.used-bytes     : 117858304
fs.0.disk.count     : 1
fs.0.disk.0.alias   : vda
fs.0.disk.0.device  : /dev/vda2
fs.1.name           : vda3
fs.1.mountpoint     : /boot/efi
fs.1.fstype         : vfat
fs.1.total-bytes    : 104607744
fs.1.used-bytes     : 12107776
fs.1.disk.count     : 1
fs.1.disk.0.alias   : vda
fs.1.disk.0.device  : /dev/vda3

fs.0.used-bytes  values remain the same after downloading large file  
================================================================

Actual results:
fs.0.used-bytes  remains the same value after downloading a large file in fedora vm 

Expected results:

fs.0.used-bytes value  should be increased for fedora/rhel by executing  "virsh guestinfo 1 --filesystem > after downloading a large file


Additional info:
the issue is not reproducible in Centos VM

Comment 1 Petr Horáček 2023-11-07 08:46:58 UTC
Hello Ahmad. This seems to be a libvirt bug. Would you please open a new Bug in Jira https://issues.redhat.com so the relevant team can take a look? Type: Bug, project: RHEL, component: libvirt. Thanks!

Comment 2 Ahmad 2023-11-07 13:18:50 UTC
(In reply to Petr Horáček from comment #1)
> Hello Ahmad. This seems to be a libvirt bug. Would you please open a new Bug
> in Jira https://issues.redhat.com so the relevant team can take a look?
> Type: Bug, project: RHEL, component: libvirt. Thanks!

Thanks Peter!
I logged a Jira bug https://issues.redhat.com/browse/RHEL-15906

Comment 3 Petr Horáček 2023-11-07 13:30:02 UTC
Thank you! I'll close this BZ now. Feel free to reopen this if needed.