Bug 1734625 - [cgroup_v2]When disable 'io' controller, the error message is code-level when try to set values to blk related params
Summary: [cgroup_v2]When disable 'io' controller, the error message is code-level when...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Pavel Hrdina
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks: 1741832
TreeView+ depends on / blocked
 
Reported: 2019-07-31 06:33 UTC by yisun
Modified: 2019-08-16 08:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1741832 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description yisun 2019-07-31 06:33:21 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.