Bug 1823729

Summary: Report file system usage statistics
Product: Red Hat Enterprise Linux 8 Reporter: Tomáš Golembiovský <tgolembi>
Component: qemu-kvmAssignee: Marc-Andre Lureau <marcandre.lureau>
qemu-kvm sub component: Guest Agent QA Contact: dehanmeng <demeng>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: medium CC: jinzhao, juzhang, lijin, qzhang, virt-maint, xiagao
Version: 8.1Keywords: FeatureBackport, TestOnly, Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-4.2.0-4.module+el8.2.0+5220+e82621dc Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-06 20:00:28 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:
Bug Depends On: 1810193, 1829082    
Bug Blocks: 1814565    

Description Tomáš Golembiovský 2020-04-14 11:04:38 UTC
File system use statistics are not reported by qemu-ga in RHEL. This feature has been added in Qemu 3.0.0, could that be backported?

Relevant patch:

    25b5ff1a860634c2b1463b2882ed02cd55f8ac62  qga: add mountpoint usage info to GuestFilesystemInfo

Comment 1 John Ferlan 2020-04-14 19:48:26 UTC
Why is this feature desired for RHEL?

RHV 4.4 should be using RHEL Advanced Virtualization 8.2.0 which has qemu-4.2.0 and not RHEL 8.2.0

Comment 2 Tomáš Golembiovský 2020-04-16 09:20:42 UTC
This is meant for guests, not virtualization hosts. The feature is already in RHEL-AV and Windows build because those were rebased. It is still missing from RHEL8 and RHEL7 guests though.

Comment 3 John Ferlan 2020-04-16 11:01:18 UTC
Fair enough, then please be more specific as to which versions you desire this to be backported to and why.

qemu-kvm-2.12 was used for RHEL 8.0 -> 8.2 as well as qemu-kvm-rhev in RHEL 7.x; however, adding to more than 8.2.1 and 7.9.0 requires z-streams and it's not clear how "important" this really is.

Comment 4 Tomáš Golembiovský 2020-04-16 20:05:41 UTC
IMO it's not a critical feature. I was hoping for 8.3 only but if 8.2.1 or 7.9 is not a problem then that would make us only happier.

Ryan, what do you think?

Comment 5 John Ferlan 2020-04-20 22:24:39 UTC
As long as the rebase happens (bug 1810193), then RHEL 8.3 will pick up the change via the RHEL AV 8.2.0 merge. So I added a depends on for that, set the prio to medium, assigned to Marc-Andre, but left the bug in NEW for now. Once that rebase is merged downstream, then we can move this bug along through the process. If for some reason the rebase doesn't happen, then the commit could be backported into 8.3.0

Backports to earlier versions are tricky and I think would require Martin Tessun to provide an opinion. For RHEL 8.2, AIUI, we don't provide qemu-kvm content to the RHEL 8.*.1 streams - preferring of course to have RHEL AV 8.*.* used instead. The current 7.9 plan doesn't have a RHV release consuming qemu-kvm-rhev, so the best that could be done is add to qemu-kvm 7.9, but I'm not sure that even makes sense especially if not in qemu-kvm-rhev.  Suffice to say it's complicated.

Comment 6 John Ferlan 2020-06-04 18:38:19 UTC
Moving to POST to follow convention of other bz's in POST as part of the rebase

Comment 7 xiagao 2020-06-05 01:38:47 UTC
Test with qemu-guest-agent-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64.rpm, can report file system usage statistics.

{"execute": "guest-get-fsinfo"}
{"return": [{"name": "sda1", "total-bytes": 1063256064, "mountpoint": "/boot", "disk": [{"serial": "0QEMU_QEMU_HARDDISK_GAGENT_TEST", "bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/sda1", "target": 0}], "used-bytes": 281026560, "type": "xfs"}, {"name": "dm-0", "total-bytes": 18238930944, "mountpoint": "/", "disk": [{"serial": "0QEMU_QEMU_HARDDISK_GAGENT_TEST", "bus-type": "scsi", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/sda2", "target": 0}], "used-bytes": 5004173312, "type": "xfs"}]}

Comment 8 John Ferlan 2020-07-14 15:45:08 UTC
Moving to ON_QA since fix was included as part of qemu-4.2 rebase for bug 1783250

Comment 9 xiagao 2020-07-16 01:27:08 UTC
Test pkg for rhel8.2.0, there is no file system usage statistics.
qemu-guest-agent-2.12.0-99.module+el8.2.0+6870+55b789b4.2.x86_64.rpm

2020-07-15 02:29:36: {"execute": "guest-get-fsinfo"}
2020-07-15 02:29:36: {"return": [{"name": "vda1", "mountpoint": "/boot", "disk": [{"serial": "GAGENT_TEST", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/vda1", "target": 0}], "type": "xfs"}, {"name": "dm-0", "mountpoint": "/", "disk": [{"serial": "GAGENT_TEST", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "type": "xfs"}]}

Test for rhel8.3.0, report file system usage statistics.
qemu-guest-agent-4.2.0-30.module+el8.3.0+7298+c26a06b8.x86_64.rpm

2020-07-14 23:57:00: {"execute": "guest-get-fsinfo"}
2020-07-14 23:57:00: {"return": [{"name": "vda1", "total-bytes": 1063256064, "mountpoint": "/boot", "disk": [{"serial": "GAGENT_TEST", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/vda1", "target": 0}], "used-bytes": 258514944, "type": "xfs"}, {"name": "dm-0", "total-bytes": 18238930944, "mountpoint": "/", "disk": [{"serial": "GAGENT_TEST", "bus-type": "virtio", "bus": 0, "unit": 0, "pci-controller": {"bus": 5, "slot": 0, "domain": 0, "function": 0}, "dev": "/dev/vda2", "target": 0}], "used-bytes": 4569296896, "type": "xfs"}]}

So verify this bug.