RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1025178 - QMP: "DEVICE_TRAY_MOVED" event is emitted twice when eject or change the scsi-cd cdrom
Summary: QMP: "DEVICE_TRAY_MOVED" event is emitted twice when eject or change the scsi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 890012
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 07:45 UTC by Sibiao Luo
Modified: 2015-09-07 12:02 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-19 21:56:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2013-10-31 07:45:40 UTC
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:

Comment 1 Paolo Bonzini 2013-10-31 13:47:20 UTC
The patch for bug 890012 should fix this one as well.

Comment 2 RHEL Program Management 2013-11-03 14:16:03 UTC
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.

Comment 5 Ademar Reis 2015-05-19 21:56:52 UTC
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).

Comment 6 Markus Armbruster 2015-09-07 12:02:17 UTC
As far as I can tell, upstream and RHEL-7 behave as expected.


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