Hide Forgot
Description of problem: QMP: "DEVICE_TRAY_MOVED" event is emitted twice when eject or change the scsi-cd cdrom, but the IDE cdrom did not meet such issue. this issue a little different bug 890012 for tray-open value in HMP monitor, but they are all specified the scsi-cd. Version-Release number of selected component (if applicable): host info: # uname -r && rpm -q qemu-kvm 2.6.32-425.el6.x86_64 qemu-kvm-0.12.1.2-2.415.el6.x86_64 guest info: # uname -r 2.6.32-425.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.boot a guest with scsi-cdrom and QMP server. e.g:...-qmp tcp:0:4444,server,nowait -drive file=/home/my-cdrom1.iso,media=cdrom,if=none,id=drive-disk1,format=raw,cache=none,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=drive-disk1,id=disk1 2.connect the QMP server via nc. $ telnet 10.16.67.29 4444 Trying 10.16.67.29... Connected to 10.16.67.29. Escape character is '^]'. {"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package": "(qemu-kvm-0.12.1.2)"}, "capabilities": []}} {"execute":"qmp_capabilities"} {"return": {}} 3.eject and change the scsi-cd cdrom in QMP monitor. ->{"execute":"eject","arguments":{"device":"drive-disk1","force":true}} ->{"execute":"change","arguments":{"device":"drive-disk1","target":"/home/my-cdrom1.iso"}} Actual results: after step 3, the "DEVICE_TRAY_MOVED" event is emitted twice when eject or change the scsi-cd cdrom. ->{"execute":"eject","arguments":{"device":"drive-disk1","force":true}} {"timestamp": {"seconds": 1383190461, "microseconds": 341709}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": true}} {"return": {}} {"timestamp": {"seconds": 1383190462, "microseconds": 525296}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": false}} ->{"execute":"change","arguments":{"device":"drive-disk1","target":"/home/my-cdrom1.iso"}} {"timestamp": {"seconds": 1383190469, "microseconds": 910601}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": true}} {"timestamp": {"seconds": 1383190469, "microseconds": 910845}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": false}} {"return": {}} Expected results: the first DEVICE_TRAY_MOVED to open the tray when eject the cdrom, and the second DEVICE_TRAY_MOVED to close the tray when change the cdrom, like: ->{"execute":"eject","arguments":{"device":"drive-disk1","force":true}} {"timestamp": {"seconds": 1383190461, "microseconds": 341709}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": true}} {"return": {}} ->{"execute":"change","arguments":{"device":"drive-disk1","target":"/home/my-cdrom1.iso"}} {"timestamp": {"seconds": 1383190469, "microseconds": 910845}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "drive-disk1", "tray-open": false}} {"return": {}} Additional info:
The patch for bug 890012 should fix this one as well.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
Corner case, no practical impact. Closing it as WONTFIX in RHEL6. Since there's no impact in RHEL7 either, where direct usage of QMP is not even supported, I'm not clonning it there. Reassigning it to Markus though, who, as the QMP upstream maintainer, may have a different opinion (Markus: feel free to reopen).
As far as I can tell, upstream and RHEL-7 behave as expected.