Bug 965016 - The libvirt hasn't correctly check I/O throttling capabilities for the QEMU binary
The libvirt hasn't correctly check I/O throttling capabilities for the QEMU b...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-20 06:19 EDT by Alex Jia
Modified: 2014-06-17 20:50 EDT (History)
8 users (show)

See Also:
Fixed In Version: libvirt-1.0.6-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 06:40:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2013-05-20 06:19:17 EDT
Description of problem:
Whether the QEMU binary supports block I/O throttling is irrelevant with VM running or not, it only has relationship with QEMU and libvirt version, if a VM isn't running, libvirt shouldn't allow to change block I/O throttling for the VM.

In addition, with '--config' option for the shutoff guest, I still got the same error message "block I/O throttling not supported with this QEMU binary" with previous. 

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm kernel
libvirt-1.0.5-2.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
kernel-3.7.0-0.36.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. # virsh domstate foo
shut off

2. # virsh blkdeviotune foo vda --write-bytes-sec 1000


Actual results:
# virsh blkdeviotune foo vda --write-bytes-sec 1000
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary


Expected results:
error: Unable to change block I/O throttle
error: Requested operation is not valid: domain is not running

and with '--config' or '--current' option, users should successfully
set block I/O throttling for the shutoff status guest.


Additional info:

# virsh blkdeviotune foo vda --write-bytes-sec 1000
error: Unable to change block I/O throttle
error: unsupported configuration: block I/O throttling not supported with this QEMU binary

However, the QEMU owns block I/O throttling capabilities:

# /usr/libexec/qemu-kvm -drive bps_wr=1000 ?
qemu-kvm: -drive bps_wr=1000: drive with bus=0, unit=0 (index=0) exists
Comment 2 Alex Jia 2013-05-20 22:37:44 EDT
(In reply to Alex Jia from comment #0)
> Description of problem:
> Whether the QEMU binary supports block I/O throttling is irrelevant with VM
> running or not, it only has relationship with QEMU and libvirt version, if a

s/QEMU and libvirt version/QEMU version/

> VM isn't running, libvirt shouldn't allow to change block I/O throttling for
> the VM.

Of course, it may have effect on guest XML configuration with '--config' or '--current' option.

In addition, if a VM is running then we can successfully change block I/O throttling parameters.


# virsh domstate foo 
running

# virsh blkdeviotune foo vda --write_iops_sec 100000

# virsh blkdeviotune foo vda
total_bytes_sec: 0
read_bytes_sec : 0
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 100000
Comment 3 Martin Kletzander 2013-05-23 08:45:21 EDT
Patch proposed upstream:

http://www.redhat.com/archives/libvir-list/2013-May/msg01696.html
Comment 4 Martin Kletzander 2013-05-24 09:10:37 EDT
Moving to POST with commit v1.0.5-371-g5af3ce8:

commit 5af3ce827767707097affc5e001eab8cbabc28a7
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu May 23 13:07:34 2013 +0200

    Fix blkdeviotune for shutoff domain
Comment 5 yanbing du 2013-06-04 06:23:31 EDT
Hi Martin,
I'm trying to verify this bug with libvirt-1.0.6-1.el7.x86_64. And find when setread_bytes_sec for a shut off guest, virsh still succeed(like using --config flag), i'm not sure if this's expect result, could you help to confirm it, thanks!
 
# virsh domstate test2
shut off

# virsh blkdeviotune test2 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

# virsh blkdeviotune test2 vda --read-bytes-sec 1000

# virsh blkdeviotune test2 vda 
total_bytes_sec: 0
read_bytes_sec : 1000
write_bytes_sec: 0
total_iops_sec : 0
read_iops_sec  : 0
write_iops_sec : 0
Comment 6 Martin Kletzander 2013-06-07 07:32:45 EDT
(In reply to yanbing du from comment #5)
yes, because by default, if the domain is not running, the flag '--config' is implied.  Same with '--live' and running domain.
Comment 7 yanbing du 2013-06-07 22:36:11 EDT
(In reply to Martin Kletzander from comment #6)
> (In reply to yanbing du from comment #5)
> yes, because by default, if the domain is not running, the flag '--config'
> is implied.  Same with '--live' and running domain.

Thanks for you confirm, then this bug can move to VERIFIED.
Comment 8 Ludek Smid 2014-06-13 06:40:29 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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