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 1433180 - groupname is missing in the output of blkdeviotune when guest is running
Summary: groupname is missing in the output of blkdeviotune when guest is running
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: jiyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-17 01:54 UTC by Fangge Jin
Modified: 2017-08-02 00:03 UTC (History)
8 users (show)

Fixed In Version: libvirt-3.2.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:24:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Fangge Jin 2017-03-17 01:54:55 UTC
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

Comment 2 Peter Krempa 2017-03-17 08:27:47 UTC
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.

Comment 3 Peter Krempa 2017-03-17 10:16:07 UTC
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.

Comment 6 Fangge Jin 2017-05-23 10:56:25 UTC
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

Comment 7 Peter Krempa 2017-05-23 15:44:01 UTC
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

Comment 8 jiyan 2017-06-01 05:59:31 UTC
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

Comment 9 Fangge Jin 2017-06-08 05:29:29 UTC
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>

Comment 10 Peter Krempa 2017-06-12 14:53:38 UTC
If you set any of the block tuning options after you set only the group name, does the right group name get used?

Comment 11 Fangge Jin 2017-06-13 06:47:23 UTC
(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>

Comment 12 Peter Krempa 2017-06-13 06:53:32 UTC
Then it is a bug. Please file a new one to track it.

Comment 13 errata-xmlrpc 2017-08-01 17:24:15 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, 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

Comment 14 errata-xmlrpc 2017-08-02 00:03:43 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, 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


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