Bug 1433180
| Summary: | groupname is missing in the output of blkdeviotune when guest is running | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Fangge Jin <fjin> |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
| Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.4 | CC: | dyuan, fjin, lmen, pkrempa, rbalakri, xuzhang, yafu, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-3.2.0-1.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 17:24:15 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: | |||
While I was poking into the crash I figured out that setting only the group name does not make sense and qemu ignores it. I've created patches that forbid such configuration. Fixed upstream:
commit 8aef3827d364ab1f1358f878d5fb6a3fea2e37fd
Author: Peter Krempa <pkrempa>
Date: Fri Mar 17 09:26:17 2017 +0100
qemu: command: Don't allow setting 'group_name' alone
The disk tuning group parameter is ignored by qemu if no other
throttling options are set. Reject such configuration, since the name
would not be honored after setting parameters via the live tuning API.
Hi Peter
I test with latest build libvirt-3.2.0-5.el7.x86_64, and found that if there is group_name in guest xml, query blkdeviotune will fail:
# virsh blkdeviotune rhel7.4 vda --group-name hhh
#virsh dumpxml vm1
<disk>
<iotune>
<group_name>hhh</group_name>
</iotune>
# virsh blkdeviotune vm1 vda --config
error: Unable to get block I/O throttle parameters
error: An error occurred, but the cause is unknown
Thank you
Fangge Jin
That is a bug in commit 4b57f76502 which was meant to fix bug https://bugzilla.redhat.com/show_bug.cgi?id=1433183 . I've posted a patch upstream: https://www.redhat.com/archives/libvir-list/2017-May/msg00880.html Version-Release number of selected component:
libvirt-3.2.0-6.el7.x86_64
qemu-kvm-rhev-2.9.0-7.el7.x86_64
Kernel-3.10.0-675.el7.x86_64
Steps to verify:
1.prepare guest.xml only with blkdeviotune group_name ,and guest1.xml with blkdeviotune group_name and any other elements
# cat guest.xml |grep "<disk" -A 10
...
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/RHEL-7.4-x86_64-latest.qcow2'/>
<target dev='vdb' bus='virtio'/>
<iotune>
<group_name>group1</group_name>
</iotune>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
...
# cat guest1.xml |grep "<disk" -A 10
...
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/RHEL-7.4-x86_64-latest.qcow2'/>
<target dev='vdb' bus='virtio'/>
<iotune>
<group_name>group1</group_name>
<total_bytes_sec>10000000</total_bytes_sec>
</iotune>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
...
2. define the vm through guest.xml and start the vm
# virsh define guest.xml
Domain guest defined from guest.xml
# virsh start guest
error: Failed to start domain guest
error: unsupported configuration: group_name can be configured only together with settings
3. define the vm through guest1.xml and start the vm
# virsh define guest1.xml
Domain guest1 defined from guest1.xml
# virsh start guest1
Domain guest1 started
Hi Peter
I met another problem about blkdeviotune group name , could you please check whether it's a bug? Thank you.
Description of problem:
[blkdeviotune]Group name is not set successfully but guest xml is changed
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>
If you set any of the block tuning options after you set only the group name, does the right group name get used? (In reply to Peter Krempa from comment #10) > If you set any of the block tuning options after you set only the group > name, does the right group name get used? After step 5, set one of the block tuning options, group "drive-virtio-disk0" is returned in the blkdeviotune query, but group "test" is shown in guest dumpxml. Is it possible to refuse setting group name when no other block tuning options are set? Steps(continue of comment 9) 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> Then it is a bug. Please file a new one to track it. 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, 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/RHEA-2017:1846 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, 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/RHEA-2017:1846 |
Description of problem: Prepare a running guest with blkdeviotune groupname, query blkdeviotune, groupname is missing in the output. Version-Release number of selected component: libvirt-3.1.0-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 0. Prepare a guest xml with blkdeviotune group_name: # cat /tmp/guest.xml ... <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/image-builder.qcow2'/> <target dev='vda' bus='virtio'/> <iotune> <group_name>group1</group_name> </iotune> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> ... 1. # virsh define /tmp/guest.xml 2. # virsh start guest 3. # virsh blkdeviotune guest vda ... size_iops_sec : 0 group_name : total_bytes_sec_max_length: 0 ... Actual results: The group name is empty in the output Expected results: The group name is not empty: group_name : group1