Bug 1460920 - [blkdeviotune] Libvirt should refuse to set group name when no other options are set.
Summary: [blkdeviotune] Libvirt should refuse to set group name when no other options ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: Michal Privoznik
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-13 07:25 UTC by Fangge Jin
Modified: 2020-11-17 17:45 UTC (History)
7 users (show)

Fixed In Version: libvirt-6.2.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-17 17:44:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Fangge Jin 2017-06-13 07:25:53 UTC
Description of problem:
Set group name by blkdeviotune when on other options are set, the group name is set in domain xml, but it doesn't take effect actually as seen from the query result of blkceviotune.

Version-Release number of selected component (if applicable):
libvirt-3.2.0-9.virtcov.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start a guest with no blkdeviotune parameters

2.# virsh blkdeviotune rhel7.4 vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0
total_bytes_sec_max: 0
read_bytes_sec_max: 0
write_bytes_sec_max: 0
total_iops_sec_max: 0
read_iops_sec_max: 0
write_iops_sec_max: 0
size_iops_sec  : 0
group_name     :
total_bytes_sec_max_length: 0
read_bytes_sec_max_length: 0
write_bytes_sec_max_length: 0
total_iops_sec_max_length: 0
read_iops_sec_max_length: 0
write_iops_sec_max_length: 0

3.# virsh blkdeviotune rhel7.4 vda --group-name test

4.# virsh blkdeviotune rhel7.4 vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0
total_bytes_sec_max: 0
read_bytes_sec_max: 0
write_bytes_sec_max: 0
total_iops_sec_max: 0
read_iops_sec_max: 0
write_iops_sec_max: 0
size_iops_sec  : 0
group_name     :              ==> group name is not set
total_bytes_sec_max_length: 0
read_bytes_sec_max_length: 0
write_bytes_sec_max_length: 0
total_iops_sec_max_length: 0
read_iops_sec_max_length: 0
write_iops_sec_max_length: 0

5.# virsh dumpxml rhel7.4|grep group -a1
      <iotune>
        <group_name>test</group_name>   ==> group name is set in domain xml
      </iotune>

6. 
# virsh blkdeviotune rhel7.4 vda --total-iops-sec 1000000000000000

7.
# virsh blkdeviotune rhel7.4 vda 
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 1000000000000000
read_iops_sec  : 0
write_iops_sec : 0
total_bytes_sec_max: 0
read_bytes_sec_max: 0
write_bytes_sec_max: 0
total_iops_sec_max: 100000000000000
read_iops_sec_max: 0
write_iops_sec_max: 0
size_iops_sec  : 0
group_name     : drive-virtio-disk0  ===> the default value is used.
total_bytes_sec_max_length: 0
read_bytes_sec_max_length: 0
write_bytes_sec_max_length: 0
total_iops_sec_max_length: 1
read_iops_sec_max_length: 0
write_iops_sec_max_length: 0

8.But in guest dumpxml, group name is "test":
# virsh dumpxml rhel7.4|grep group
        <group_name>test</group_name>

Actual results:
As description

Expected results:
Refuse to set group name when no other options are set.

Comment 2 Jaroslav Suchanek 2019-04-24 12:26:41 UTC
This bug is going to be addressed in next major release.

Comment 3 Peter Krempa 2020-02-10 15:10:51 UTC
Possibly fixed by 

https://www.redhat.com/archives/libvir-list/2020-January/msg01278.html

Comment 4 Jaroslav Suchanek 2020-02-18 13:24:07 UTC
Michal, can you please confirm if the patches from comment 3 fixes this issue? If not please move it to backlog. Thanks.

Comment 5 Michal Privoznik 2020-02-19 14:49:28 UTC
Yes, it's fixed upstream by following commits:

93b66b3cbb qemu: when leaving iotune group update xml properly
57ac9f5eef qemu: get defaults from iotune group we move disk into
bb36ae81a0 qemu: fix using defaults when setting persistent iotune params
dd94f36ffb qemu: check iotune params same for all disk in group
e7efffe6cb qemu: propagate iotune settings to all disks in the group
eb4455daab conf: expand iotune params if only group name is given
67ebd6ac26 qemu: Move qemuDiskConfigBlkdeviotuneHas* to conf

v6.0.0-172-g93b66b3cbb

Comment 8 yisun 2020-07-21 07:41:20 UTC
Verified with:
libvirt-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64

Steps:
1. Having a vm disk, which has no blkdeviotune params set
[root@libvirt-rhel-8 ~]# virsh blkdeviotune vm1 vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0
total_bytes_sec_max: 0
read_bytes_sec_max: 0
write_bytes_sec_max: 0
total_iops_sec_max: 0
read_iops_sec_max: 0
write_iops_sec_max: 0
size_iops_sec  : 0
group_name     :
total_bytes_sec_max_length: 0
read_bytes_sec_max_length: 0
write_bytes_sec_max_length: 0
total_iops_sec_max_length: 0
read_iops_sec_max_length: 0
write_iops_sec_max_length: 0

2. Try to add a group name for it.
[root@libvirt-rhel-8 ~]# virsh blkdeviotune vm1 vda --group-name test
error: Unable to change block I/O throttle
error: unsupported configuration: creating a new group/updating existing with all tune parameters zero is not supported

[root@libvirt-rhel-8 ~]# virsh blkdeviotune vm1 vda --group-name test --config
error: Unable to change block I/O throttle
error: unsupported configuration: creating a new group/updating existing with all tune parameters zero is not supported

[root@libvirt-rhel-8 ~]# virsh destroy vm1
Domain vm1 destroyed

[root@libvirt-rhel-8 ~]# virsh blkdeviotune vm1 vda --group-name test --config
error: Unable to change block I/O throttle
error: unsupported configuration: creating a new group/updating existing with all tune parameters zero is not supported

Comment 11 errata-xmlrpc 2020-11-17 17:44:45 UTC
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:8.3 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-2020:5137


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