Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1741832

Summary: [cgroup_v2]When disable 'io' controller, the error message is code-level when try to set values to blk related params
Product: Red Hat Enterprise Linux 8 Reporter: yisun
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED DEFERRED QA Contact: yisun
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.1CC: phrdina, rbalakri, yalzhang, yisun
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1734625 Environment:
Last Closed: 2020-03-10 12:09:44 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: 1734625    
Bug Blocks:    

Description yisun 2019-08-16 08:11:31 UTC
+++ This bug was initially created as a clone of Bug #1734625 +++

Description:
When disable 'io' controller, the error message is code-level when try to set values to blk related params

Versions:
libvirt-5.5.0-2.module+el8.1.0+3773+7dd501bf.x86_64

How reproducible:
100%

Pls note:
This is a regression but not a serious issue.
And happens with cgroup v1 and v2.

Steps:
1. Disable blkio controller with qemu.conf
$ cat /etc/libvirt/qemu.conf | grep "^cgroup"
cgroup_controllers = [ "cpu", "devices", "memory", "cpuset", "cpuacct" ]

$ systemctl restart libvirtd

2. Try to use 'blkiotune' cmd to set values to some params
$ virsh blkiotune avocado-vt-vm1 --device-read-iops-sec /dev/sda,330 --device-write-iops-sec /dev/sda,293
error: Unable to change blkio parameters
error: internal error: failed to get cgroup backend for 'setBlkioDeviceWriteIops'

$ virsh blkiotune avocado-vt-vm1 --device-weights /dev/sda,100
error: Unable to change blkio parameters
error: internal error: failed to get cgroup backend for 'setBlkioDeviceWeight'

$ virsh blkiotune avocado-vt-vm1 --weight 100
error: Unable to change blkio parameters
error: internal error: failed to get cgroup backend for 'setBlkioWeight'
<==== we can see these "internal error" is code level, not suitable for end-user

Additional info:
1. When just try to getting the values, the error message is clear
 virsh blkiotune avocado-vt-vm1
error: Unable to get blkio parameters
error: Requested operation is not valid: blkio cgroup isn't mounted

2. other controllers don't have this problem.

3. With rhel7.7 libvirt-4.5.0-23.el7.x86_64, the error message is clear
# virsh blkiotune avocado-vt-vm1 --weight 100
error: Unable to change blkio parameters
error: internal error: Controller 'blkio' is not mounted

3

Expected result:
Should keep the error message as before.

Comment 1 yisun 2019-08-16 08:18:50 UTC
reproduced on: libvirt-4.5.0-31.module+el8.1.0+3808+3325c1a3.x86_64
so clone to rhel8.1 branch

Comment 2 Pavel Hrdina 2020-03-10 12:09:44 UTC
I don't think this is critical enough to backport it to RHEL.  There is a separate BZ for RHEL-AV where it will eventually get by rebase once we address this issue in upstream and it will eventually get into RHEL as well.  The error message is not ideal but it's good enough to figure out that cgroups are not working.