Bug 1941407
Summary: | weight info of blkiotune in guest xml does not updated after setting it via virsh blkiotune | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Lili Zhu <lizhu> |
Component: | libvirt | Assignee: | Daniel Henrique Barboza (IBM) <dbarboza> |
Status: | CLOSED ERRATA | QA Contact: | yisun |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 8.4 | CC: | jdenemar, jsuchane, knoel, lmen, pkrempa, virt-maint, xuzhang, yisun |
Target Milestone: | rc | Keywords: | Regression, Triaged |
Target Release: | 8.5 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.3.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-16 07:52: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: | 7.2.0 |
Embargoed: |
Description
Lili Zhu
2021-03-22 05:32:44 UTC
The regression was introduced by: commit ac87d3520ad542d558854a72b0ae0a81fddc6747 Author: Daniel Henrique Barboza <danielhb413> Date: Mon Feb 17 16:29:18 2020 -0500 domain_cgroup.c: add virDomainCgroupSetupDomainBlkioParameters() After the introduction of virDomainDriverMergeBlkioDevice() in a previous patch, it is now clear that lxcDomainSetBlkioParameters() and qemuDomainSetBlkioParameters() uses the same loop to set cgroup blkio parameter of a domain. Avoid the repetition by adding a new helper called virDomainCgroupSetupDomainBlkioParameters(). Signed-off-by: Daniel Henrique Barboza <danielhb413> Signed-off-by: Ján Tomko <jtomko> Reviewed-by: Ján Tomko <jtomko> The important part is: The code removed from the qemu driver: - if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) { - if (virCgroupSetBlkioWeight(priv->cgroup, param->value.ui) < 0 || - virCgroupGetBlkioWeight(priv->cgroup, &def->blkio.weight) < 0) - ret = -1; vs the code added in the common helper: + if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) { + if (virCgroupSetBlkioWeight(cgroup, params[i].value.ui) < 0) + ret = -1; Daniel, would you please have a look? Thanks. (In reply to Jaroslav Suchanek from comment #2) > Daniel, would you please have a look? Thanks. As said by Peter in comment #1, the problem is that the patch mentioned there removed the virCgroupGetBlkioWeight() call that is used to set the new blkio.weight value back to the domain. Adding this call back fixes the issue. The patch is posted to the mailing list: https://listman.redhat.com/archives/libvir-list/2021-March/msg01176.html Patch was accepted upstream and posted downstream. [root@dell-per740xd-11 ~]# rpm -qa | grep ^libvirt-7 libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64 1. start vm with blkio.bfq.weight set to 123 [root@dell-per740xd-11 ~]# virsh start avocado-vt-vm1 Domain 'avocado-vt-vm1' started [root@dell-per740xd-11 ~]# virsh dumpxml avocado-vt-vm1 | awk '/<blk/,/<\/blk/' <blkiotune> <weight>123</weight> </blkiotune> 2. set it to 560 [root@dell-per740xd-11 ~]# virsh blkiotune avocado-vt-vm1 560 3. check active vm xml [root@dell-per740xd-11 ~]# virsh dumpxml avocado-vt-vm1 | awk '/<blk/,/<\/blk/' <blkiotune> <weight>560</weight> </blkiotune> 4. check cgroup value [root@dell-per740xd-11 ~]# cat /sys/fs/cgroup/blkio/machine.slice/machine-qemu\\x2d1\\x2davocado\\x2dvt\\x2dvm1.scope/blkio.bfq.weight 560 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 (virt:av bug fix and enhancement 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/RHBA-2021:4684 |