Bug 1100769 - blkiotune weight range should be (10, 1000)
Summary: blkiotune weight range should be (10, 1000)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-23 12:16 UTC by zhe peng
Modified: 2015-03-05 07:36 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.7-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:36:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description zhe peng 2014-05-23 12:16:03 UTC
Description of problem:
blkiotune weight range should be (10,1000) after kernel 2.6.39


Version-Release number of selected component (if applicable):
libvirt-1.1.1-29.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.prepare a guest
2.# virsh blkiotune base --weight 99
error: Unable to change blkio parameters
error: invalid argument: out of blkio weight range.


Actual results:


Expected results:
After kernel 2.6.39, the value could be in the range [10, 1000].

Additional info:

Comment 2 Martin Kletzander 2014-07-24 17:22:32 UTC
Fixed upstream with v1.2.6-257-g9318121:

commit 9318121db83f8c8151d88bf7de72774decc2b544
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Jul 24 13:43:47 2014 +0200

    remove range checking for blkiotune weight

Comment 4 Shanzhi Yu 2014-11-26 07:28:11 UTC
I am trying verify this bug.

0. Prepare a running guest
# virsh list 
 Id    Name                           State
----------------------------------------------------
 4     rh7                            running

# virsh blkiotune rh7
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

1. with value smaller than 10

1.1 Set with invalid value
# virsh blkiotune rh7 --weight 9
error: Unable to change blkio parameters
error: Invalid value '9' for 'blkio.weight': Invalid argument

1.2 Check the value, make sure it doesn't change 

# virsh blkiotune rh7
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

2. with value large than 100

2.1 Set with invalid value
# virsh blkiotune rh7 --weight 1001
error: Unable to change blkio parameters
error: Invalid value '1001' for 'blkio.weight': Invalid argument

2.2 Check the value, make sure it doesn't change 
# virsh blkiotune rh7
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

3. Set value with 10 or 1000, it work as expected

# virsh blkiotune rh7 --weight 10

# virsh blkiotune rh7
weight         : 10
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec: 

# virsh blkiotune rh7 --weight 1000

# virsh blkiotune rh7
weight         : 1000
device_weight  : 
device_read_iops_sec: 
device_write_iops_sec: 
device_read_bytes_sec: 
device_write_bytes_sec:

Hi Martin,
I have one problem about trying set blkiotune when guest is shut off status, it will not post error when try to set a invalid value. I am not sure if libvirt should post error in such case.

# virsh list  --inactive 
 Id    Name                           State
----------------------------------------------------
 -     rh7                            shut off

# virsh blkiotune rh7 --weight 1

# virsh start rh7
error: Failed to start domain rh7
error: Invalid value '1' for 'blkio.weight': Invalid argument

If you think it is ok, I will verify this bug.

Thanks

Comment 5 Martin Kletzander 2014-11-26 08:24:07 UTC
Since we removed the checks for the range, you can set what kernel allows (if the domain is running) and anything if it is not.  However, kernel has to allow it when it is starting.  So it works exactly as it should.

Comment 6 Shanzhi Yu 2014-11-26 08:29:54 UTC
Change to verify according comment 4 and comment 5

Comment 8 errata-xmlrpc 2015-03-05 07:36: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://rhn.redhat.com/errata/RHSA-2015-0323.html


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