Bug 1414641 - The HMP command "block_set_io_throttle" not support in qemu-kvm-rhev-2.8.0-2.el7
Summary: The HMP command "block_set_io_throttle" not support in qemu-kvm-rhev-2.8.0-2.el7
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-19 06:09 UTC by Yongxue Hong
Modified: 2017-08-01 07:09 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-20 22:57:20 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Yongxue Hong 2017-01-19 06:09:31 UTC
Description of problem:
The HMP command "block_set_io_throttle" not support in qemu-kvm-rhev-2.8.0-2.el7,but supported in qemu-kvm-rhev-2.6.0-28.el7_3.2

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-543.el7.ppc64le
qemu: qemu-kvm-rhev-2.8.0-2.el7

Guest kernel:3.10.0-543.el7.ppc64
How reproducible:
100%

Steps to Reproduce:
1.create two disk 
eg:
/usr/libexec/qemu-kvm \
-name RHEL7-8393 \
-M pseries-rhel7.4.0 \
-m 64G \
-smp 4 \
-boot menu=on,order=c \
-device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=06 \
-drive file=/home/hyx/os/RHEL-7.3-20161019.0-Server-ppc64-dvd1.iso,if=none,media=cdrom,id=image0 \
-device scsi-cd,id=scsi-cd0,drive=image0,channel=0,scsi-id=0,lun=0,bootindex=1 \
-drive file=/home/hyx/image/RHEL7-8393-2-18G.raw,if=none,media=disk,format=raw,cache=none,bps=102400,bps_rd=204800,id=image2 \
-device scsi-hd,id=scsi-hd2,drive=image2,channel=0,scsi-id=0,lun=1 \
-drive file=/home/hyx/image/RHEL7-8393-20G.raw,if=none,media=disk,format=raw,id=image1 \
-device scsi-hd,id=scsi-hd1,drive=image1,channel=0,scsi-id=0,lun=2,bootindex=0 \
-device nec-usb-xhci,id=xhci \
-drive file=/home/hyx/image/ubs-1G.raw,if=none,id=stick,bps_rd=102400,iops_rd=100,bps_wr=102400,iops_wr=100 \
-device usb-storage,removable=on,bus=xhci.0,drive=stick \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup \
-device spapr-vlan,netdev=hostnet0,id=virtio-net-pci0,mac=70:e2:84:14:0e:18 \
-rtc base=utc,clock=vm \
-monitor stdio \
-serial unix:./sock1,server,nowait \
-qmp tcp:0:6000,server,nowait \
-device usb-tablet \
-vnc :1
2.boot guest and execute HMP command
eg:
(qemu) block_set_io_throttle scsi-hd2 102400 204800 0 0 0 0
or
(qemu) block_set_io_throttle image2 102400 204800 0 0 0 0

Actual results:
The HMP show "Need exactly one of 'device' and 'id'"

Expected results:
The command HMP could be executed successfully.

Additional info:

Comment 2 Ademar Reis 2017-01-20 14:42:44 UTC
I believe this was done on purpose:

commit 4dc9397b62c1a50a4afb5881abb55d07058e0812
Author: Eric Blake <eblake@redhat.com>
Date:   Wed Jul 13 21:50:21 2016 -0600

    block: Simplify block_set_io_throttle
    
    Now that we can support boxed commands, use it to greatly
    reduce the number of parameters (and likelihood of getting
    out of sync) when adjusting throttle parameters.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Alberto Garcia <berto@igalia.com>
    Message-Id: <1468468228-27827-11-git-send-email-eblake@redhat.com>
    Reviewed-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Markus Armbruster <armbru@redhat.com>

Anyway, given we don't support HMP in RHEL, it should be OK to close this BZ, but I'll let Eric review it once more.

Comment 3 Eric Blake 2017-01-20 22:57:20 UTC
Accidentally broken here:

commit 7a9877a0263561f11bae116a7639eec53a625807
Author: Kevin Wolf <kwolf@redhat.com>
Date:   Tue Sep 20 13:38:48 2016 +0200

    block: Accept device model name for block_set_io_throttle
    
    In order to remove the need for BlockBackend names in the external API,
    we want to allow qdev device names in all device related commands.
    
    This converts block_set_io_throttle to accept a qdev device name.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Agree that this does not affect RHEL, so there's nothing to backport, but I'll send the upstream patch to fix it, anyways.

Comment 4 Eric Blake 2017-01-20 23:15:31 UTC
Upstream patch
https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg04473.html

Comment 5 Gu Nini 2017-03-02 09:38:12 UTC
Hi Eric,

I fail to understand what commit 4dc9397 intends doing. Since I am doing the io throttling test plan of RHEL7.4, could you give some explanation about the commit, should we add some related cases?

Thanks!
Nini Gu

Comment 6 Eric Blake 2017-03-02 14:10:02 UTC
(In reply to Gu Nini from comment #5)
> Hi Eric,
> 
> I fail to understand what commit 4dc9397 intends doing.

Commit 4dc9397 was an internal-only change (no semantic change to the user interface), designed to make parameter passing less of a maintenance burden by bundling multiple parameters into a struct.  The bug in question was introduced in commit 7a9877a, but even that affected only HMP, which is not supported in RHEL.

>  Since I am doing the
> io throttling test plan of RHEL7.4, could you give some explanation about
> the commit, should we add some related cases?
> 

As far as I can tell, there are no changes required to RHEL testing based on this bug.


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