Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690214 - IO throttling parameters failed to transfer from the original cdrom to the changed one
Summary: IO throttling parameters failed to transfer from the original cdrom to the ch...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Stefan Hajnoczi
QA Contact: CongLi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-19 03:03 UTC by lchai
Modified: 2019-04-12 23:12 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description lchai 2019-03-19 03:03:13 UTC
Description of problem:
Set io throttling parameters on a cdrom, after the cdrom was changed, the settings was not tranferred to the new cdrom.

Version-Release number of selected component (if applicable):
kernel-3.10.0-1022.el7.x86_64
qemu-kvm-rhev-2.12.0-24.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Boot up a guest with a cdrom virtual disk and set its io throttling parameters at the same time:
/usr/libexec/qemu-kvm -M q35 \
	-S \
	-cpu SandyBridge \
	-enable-kvm \
	-m 4G \
	-smp 4 \
	-object iothread,id=iothread0 \
	-object throttle-group,id=foo,x-bps-total=1024000,x-iops-total=100 \
	-rtc base=utc,clock=host,driftfix=slew \
	-device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
	-device pcie-root-port,id=pcie.0-root-port-3,slot=3,chassis=3,addr=0x3,bus=pcie.0 \
	-device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
	-blockdev driver=file,cache.direct=on,cache.no-flush=off,filename=/home/kvm_autotest_root/images/rhel77-64-virtio.qcow2,node-name=win_disk \
	-blockdev driver=qcow2,node-name=drive_win,file=win_disk \
	-device virtio-blk-pci,drive=drive_win,id=win1,write-cache=on,bus=pcie.0-root-port-2,addr=0x0,iothread=iothread0 \
	-device virtio-scsi-pci,id=scsi0,bus=pcie.0-root-port-4,addr=0x0 \
	***-blockdev driver=throttle,throttle-group=foo,cache.direct=on,cache.no-flush=off,file.filename=/home/kvm_autotest_root/images/cd1,node-name=cdrom1,file.driver=file,read-only=on \
	-device scsi-cd,drive=cdrom1,id=cd1 \***
	-device virtio-net-pci,mac=6c:ae:8b:20:80:59,id=netdev1,vectors=4,netdev=net1,bus=pcie.0-root-port-3 -netdev tap,id=net1,vhost=on \
	-qmp tcp:0:4446,server,nowait \
	-vga qxl \
	-vnc :4 \
	-monitor stdio \
	-boot menu=on

2. Check the io throttling parameters in hmp
(qemu) info block
cdrom1: json:{"throttle-group": "foo", "driver": "throttle", "file": {"driver": "file", "filename": "/home/kvm_autotest_root/images/cd1"}} (throttle, read-only)
    Attached to:      cd1
    Removable device: locked, tray closed
    Cache mode:       writeback, direct

3. Try to change the cdrom in qmp

Open the tray:
{ 'execute': 'blockdev-open-tray','arguments':{'id':'cd1'}}
{"return": {}}
{"timestamp": {"seconds": 1552962904, "microseconds": 375012}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "", "tray-open": true, "id": "cd1"}}

change medium:
{"execute":"blockdev-change-medium","arguments":{"id":"cd1","filename":"/home/kvm_autotest_root/images/cd2"}}
{"timestamp": {"seconds": 1552962946, "microseconds": 38931}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "", "tray-open": false, "id": "cd1"}}
{"return": {}}

4. Re-check the io throttling settings
(qemu) info block
#block205: /home/kvm_autotest_root/images/cd2 (qcow2, read-only)
    Attached to:      cd1
    Removable device: locked, tray closed
    Cache mode:       writeback, direct


Actual results:
cdrom was changed successfully, but no io throttling paremeters was set on the new cdrom.

Expected results:
cdrom was changed successfully, and the io throttling parameters was same as beform.


Additional info:
The block device node name changed after the operation - "change cdrom".


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