Red Hat Bugzilla – Bug 1318569
Eject cdrom fails since tray is locked but next try succeeds
Last modified: 2016-11-03 14:39:50 EDT
Description of problem: In rhel7.2 update-device and change-media can be done once. but now it needs to execute twice. Version-Release number of selected component (if applicable): libvirt-1.3.2-1.el7.x86_64 qemu-kvm-rhev-2.5.0-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. define and start a guest with cdrom device. # virsh domblklist r72 Target Source ------------------------------------------------ hdc /mnt/at-dt/change-media/a.iso vda /tmp/zp/r72.qcow2 2. eject cdrom # virsh change-media r72 --eject hdc error: Failed to complete action eject on media error: internal error: unable to execute QEMU command 'eject': Tray of device 'drive-ide0-1-0' is not open # virsh change-media r72 --eject hdc Successfully ejected media. Actual results: As step2, change-media eject cdrom failed at first time, succeed at the second time. Expected results: As the expected result as before, it should be done once. Additional info: In qemu-kvm-rhev-2.5.0-2, the error message after ejecting cdrom is changed. It is not "is locked" any more. It's "Tray of device xx is not open". but libvirt is still checking if cdrom "is locked". ...... if (ret < 0 && c_strcasestr(virJSONValueToString(reply, false), "is locked")) ret = -2; ......
Upstream commit: commit 0f4d31720430b4e3735064cc0d8f88a1a438e154 Author: Pavel Hrdina <phrdina@redhat.com> Date: Thu Mar 17 16:38:28 2016 +0100 qemu-hotplug: fix eject media
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
verify the bug. version: libvirt-1.3.3-1.el7.x86_64 qemu-kvm-rhev-2.5.0-4.el7.x86_64 step: 1.define and start a guest with cdrom: [root@localhost ~]# virsh domblklist r7 Target Source ------------------------------------------------ vda /var/lib/libvirt/images/r7-1.qcow2 vdd /dev/sdb4 hda /root/RHEL-7.2-20151030.0-Server-x86_64-dvd1.iso 2.eject cdrom [root@localhost ~]# virsh change-media r7 --eject hda Successfully ejected media. [root@localhost ~]# virsh domblklist r7 Target Source ------------------------------------------------ vda /var/lib/libvirt/images/r7-1.qcow2 vdd /dev/sdb4 hda -
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-2577.html