Bug 974010 - It should report error while the bps or iops values are not supported by guest
It should report error while the bps or iops values are not supported by guest
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-13 05:30 EDT by Xuesong Zhang
Modified: 2014-06-17 20:51 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-1.1.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:41:21 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 Xuesong Zhang 2013-06-13 05:30:52 EDT
Description of problem
It should report error while the bps or iops values are not supported by guest.

Version-Release number of selected component (if applicable):
libvirt-1.0.6-1.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64

How reproducible:
100%

Steps
1. prepare one running guest.

2. Set iotune total_bytes_sec
# virsh blkdeviotune b hda --total-bytes-sec 12212221112000930000
error: Unable to change block I/O throttle
error: internal error Unexpected error

3. Set iotune total_bytes_sec with option --config
#virsh blkdeviotune b hda --total-bytes-sec 12212221112000930000 --config

4. check in the inactive dumpxml
# virsh dumpxml b --inactive |grep -A 5 disk
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/kvm-rhel6.4-x86_64-qcow2.img'/>
      <target dev='hda' bus='ide'/>
      <iotune>
        <total_bytes_sec>12212221112000930000</total_bytes_sec>
......
5. destroy this domain and start it again.
# virsh destroy b
Domain b destroyed

# virsh start b
error: Failed to start domain b
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 (label charserial0)
qemu-kvm: -drive file=/var/lib/libvirt/images/kvm-rhel6.4-x86_64-qcow2.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none,bps=12212221112000930000: bps and iops values must be 0 or greater


Actual results:
as steps

Expected results:
It should report error in step3 if the bos or iops valuses are not supportted by guest.
The error message should be same as the one in step 2.
Comment 2 Ján Tomko 2013-06-24 08:29:33 EDT
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2013-June/msg00979.html
Comment 3 Ján Tomko 2013-06-24 09:36:32 EDT
Now fixed upstream:
commit d3c87884927e6b745d0a5680e6d94a40c4f484f7
Author:     Ján Tomko <jtomko@redhat.com>
AuthorDate: 2013-06-24 14:18:14 +0200
Commit:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2013-06-24 14:18:14 +0200

    qemu: check if block I/O limits fit into long long
    
    We can only pass values up to LLONG_MAX through JSON
    and QEMU checks if the int64_t number is not negative
    at startup since 1.5.0.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=974010

git describe: v1.0.6-120-gd3c8788
Comment 4 hyao@redhat.com 2013-06-28 01:46:24 EDT
Reproduce the bug with same version 
#rpm -qa libvirt qemu-kvm kernel
qemu-kvm-1.5.0-2.el7.x86_64
libvirt-1.0.6-1.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
Comment 5 Shanzhi Yu 2013-07-02 22:41:40 EDT
verify this bug with libvirt-1.1.0-1.el7.x86_64.

Steps:
1. prepare one running guest.

2. Set iotune total_bytes_sec
# virsh blkdeviotune kvm-rhel6.3-x86_64-qcow2-virtio vda --total-bytes-sec 12212221112000930000
error: Unable to change block I/O throttle
error: numerical overflow: block I/O throttle limit value must be less than 9223372036854775807

3. Set iotune total_bytes_sec with option --config
#virsh blkdeviotune kvm-rhel6.3-x86_64-qcow2-virtio hda --total-bytes-sec 12212221112000930000 --config
error: Unable to change block I/O throttle
error: numerical overflow: block I/O throttle limit value must be less than 9223372036854775807
4. check in the inactive dumpxml
# virsh dumpxml kvm-rhel6.3-x86_64-qcow2-virtio --inactive |grep -A 5 disk
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/kvm-rhel6.3-x86_64-qcow2.img'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
......
The error is clear, so verify this bug.
Comment 6 Ludek Smid 2014-06-13 08:41:21 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.