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 1122819 - Cannot use blkdeviotune to set limit for a shut off guest
Summary: Cannot use blkdeviotune to set limit for a shut off guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-24 07:25 UTC by Luyao Huang
Modified: 2014-10-14 04:23 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.2-43.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 04:23:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1374 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2014-10-14 08:11:54 UTC

Description Luyao Huang 2014-07-24 07:25:43 UTC
Description of problem:
Cannot use blkdeviotune to set limit for a shut off guest

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.431.el6.x86_64
libvirt-0.10.2-41.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     test                           shut off
 -     test2                          shut off
 -     test3                          shut off

2.# virsh dumpxml test

 <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/test.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>

3.# virsh blkdeviotune test vda 10000
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary




Actual results:
Cannot use blkdeviotune set limit for a shut off guest,and report a wrong error.
qemu-kvm-rhev have supported vda before. 

Expected results:
No error report

Additional info:
Also found this bug in RHEL6.5.z:
version:
libvirt-0.10.2-29.el6_5.11.x86_64
qemu-kvm-rhev-0.12.1.2-2.415.el6_5.12.x86_64

Comment 2 Ján Tomko 2014-07-24 08:11:54 UTC
Fixed upstream by:
commit 5af3ce827767707097affc5e001eab8cbabc28a7
Author:     Martin Kletzander <mkletzan>
CommitDate: 2013-05-24 13:29:20 +0200

    Fix blkdeviotune for shutoff domain
    
    Function qemuDomainSetBlockIoTune() was checking QEMU capabilities
    even when !(flags & VIR_DOMAIN_AFFECT_LIVE) and the domain was
    shutoff, resulting in the following problem:
    
     virsh # domstate asdf; blkdeviotune asdf vda --write-bytes-sec 100
     shut off
    
     error: Unable to change block I/O throttle
     error: unsupported configuration: block I/O throttling not supported with this QEMU binary
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=965016

git describe: v1.0.5-371-g5af3ce8 contains: v1.0.6-rc1~15

Comment 5 Luyao Huang 2014-08-11 06:21:45 UTC
I can't reproduce with libvirt-0.10.2-43.el6.x86_64 in root mode.
Steps:

1.# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     test6                          shut off

2. # virsh blkdeviotune test6 hda 24

3. # virsh blkdeviotune test6 hda
total_bytes_sec: 24
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

4.# virsh blkdeviotune test6 hda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

But i still found this bug in session mode:
1.$ virsh uri
qemu:///session

2.$ virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     sdfs                           shut off

3.$ virsh blkdeviotune sdfs hda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

4.$ virsh blkdeviotune sdfs hda 1
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary

Comment 6 Martin Kletzander 2014-08-11 08:35:16 UTC
But that's a whole different issue.  Commit 45ad1adb would nee to be backported for that, but it would *only* change the error message, it still wouldn't be available.

Comment 7 Luyao Huang 2014-08-11 09:32:45 UTC
(In reply to Martin Kletzander from comment #6)
> But that's a whole different issue.  Commit 45ad1adb would nee to be
> backported for that, but it would *only* change the error message, it still
> wouldn't be available.

I am sorry i don't know why it would only change the error message. From our doc in mojo blkdeviotune can be used in session mode.So i think it can be used to a shut off geust insession mode.

Thanks,
Luyao Huang

Comment 8 Martin Kletzander 2014-08-13 10:03:32 UTC
(In reply to Luyao Huang from comment #7)
Well, that was probably a bug, because we set the limiting using cgroups (as well), and that can't be done without root privileges.

Comment 14 Martin Kletzander 2014-08-15 12:34:55 UTC
Oh, I apologize for the confusion, I've mistaken blkiotune with blkdeviotune again. Of course this can be fixed in this BZ as well, it's a trivial patch. Than you for your patience.

Comment 15 dyuan 2014-08-19 06:46:49 UTC
(In reply to Martin Kletzander from comment #14)
> Oh, I apologize for the confusion, I've mistaken blkiotune with blkdeviotune
> again. Of course this can be fixed in this BZ as well, it's a trivial patch.
> Than you for your patience.

Hi Martin, will you re-assign this bug and post a fix to it again ?

Comment 16 Martin Kletzander 2014-08-19 07:25:22 UTC
I'm re-assigning it back to myself as this is waiting for one more (trivial) patch to go in.

Comment 17 Martin Kletzander 2014-08-19 13:08:43 UTC
As I see it, it works in session mode on, so there was no point in putting this back in ASSIGNED.  The fix was needed upsteam, but not in libvirt-0.10.2-43.  Here is the output I tested.  So I'm putting this back to ON_QA, please verify it ASAP and in case there is any other problem with session mode or anything else, file a new bug for it.

[test@rhel66 ~]$ rpm -q libvirt
libvirt-0.10.2-43.el6.x86_64
[test@rhel66 ~]$ virsh uri
qemu:///session

[test@rhel66 ~]$ virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     asdf                           shut off

[test@rhel66 ~]$ virsh blkdeviotune asdf 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

[test@rhel66 ~]$ virsh blkdeviotune asdf vda 10

[test@rhel66 ~]$ virsh blkdeviotune asdf vda
total_bytes_sec: 10
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0

[test@rhel66 ~]$ virsh blkdeviotune asdf vda 0

[test@rhel66 ~]$ virsh blkdeviotune asdf 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

Comment 18 Luyao Huang 2014-08-20 01:56:28 UTC
(In reply to Martin Kletzander from comment #17)
> As I see it, it works in session mode on, so there was no point in putting
> this back in ASSIGNED.  The fix was needed upsteam, but not in
> libvirt-0.10.2-43.  Here is the output I tested.  So I'm putting this back
> to ON_QA, please verify it ASAP and in case there is any other problem with
> session mode or anything else, file a new bug for it.
> 
> [test@rhel66 ~]$ rpm -q libvirt
> libvirt-0.10.2-43.el6.x86_64
> [test@rhel66 ~]$ virsh uri
> qemu:///session
> 
> [test@rhel66 ~]$ virsh list --all
>  Id    Name                           State
> ----------------------------------------------------
>  -     asdf                           shut off
> 
> [test@rhel66 ~]$ virsh blkdeviotune asdf 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
> 
> [test@rhel66 ~]$ virsh blkdeviotune asdf vda 10
> 
> [test@rhel66 ~]$ virsh blkdeviotune asdf vda
> total_bytes_sec: 10
> read_bytes_sec : 0
> write_bytes_sec: 0
> total_iops_sec : 0
> read_iops_sec  : 0
> write_iops_sec : 0
> 
> [test@rhel66 ~]$ virsh blkdeviotune asdf vda 0
> 
> [test@rhel66 ~]$ virsh blkdeviotune asdf 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

Hi martin ,i have did it again and found issue disappear.Maybe the last time my
env was wrong.So set this bug status to verified.

But i have a problem about blkdeviotune can't be used in session mode in RHEL7.As you say in Comment 10 , i think blkdeviotune should can be used in session mode in RHEL7.Can i open a new Bug about this issue?

Comment 19 Martin Kletzander 2014-08-20 04:07:49 UTC
Yes, please create a new bug for that and assign it to me, thank you.

Comment 20 Luyao Huang 2014-08-20 05:31:11 UTC
(In reply to Martin Kletzander from comment #19)
> Yes, please create a new bug for that and assign it to me, thank you.

OK,i filed a new bug 1131788 for this issue.

Comment 22 errata-xmlrpc 2014-10-14 04:23:18 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.

http://rhn.redhat.com/errata/RHBA-2014-1374.html


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