Bug 2166411
Summary: | virt-xml: Updating cdrom device file: Error attempting device update: internal error: unable to execute QEMU command 'blockdev-remove-medium': Tray of device 'scsi0-0-0' is not open | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Martin Pitt <mpitt> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | General | QA Contact: | Han Han <hhan> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | urgent | ||
Priority: | high | CC: | berrange, chwen, crobinso, extras-qa, hongzliu, jdenemar, jjongsma, juzhou, khanicov, lmen, mprivozn, philip.wyett, pkrempa, smitterl, tyan, tzheng, virt-maint, xchen |
Version: | 9.2 | Keywords: | Regression, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Unspecified | ||
Whiteboard: | CockpitTest | ||
Fixed In Version: | libvirt-9.0.0-4.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 2163117 | Environment: | |
Last Closed: | 2023-05-09 07:27:45 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 2163117 | ||
Bug Blocks: |
Description
Martin Pitt
2023-02-01 18:32:15 UTC
This appears to be a bug in libvirt. According to git bisect, 5ef2582646eb98af208ce37355f82bdef39931fa is the first bad commit, which makes sense becuase the the commit is related to disk tray events. So the regression was first included in libvirt 9.0. *** Bug 2166503 has been marked as a duplicate of this bug. *** I'd like to highlight that because of this issue we can't exchange cdroms in a VM while it's running, this looks like a critical functionality and I'm not aware of any workaround, I might be wrong of course. The aforementioned commit causes this regression by 'continue'-ing the for loop extracting disk information if the disk tray state didn't change. That unfortunately skipped over the assignment of whether the device is removable and has a tray into disk private data, which is the primary task the function does. I'll post a patch soon. Fixed upstream: commit 86cfe93ef7fdc2d665a2fc88b79af89e7978ba78 Author: Peter Krempa <pkrempa> Date: Thu Feb 9 09:40:32 2023 +0100 qemuProcessRefreshDisks: Don't skip filling of disk information if tray state didn't change Commit 5ef2582646eb98 added emitting of even when refreshign disk state, where it wanted to avoid sending the event if disk state didn't change. This was achieved by using 'continue' in the loop filling the information. Unfortunately this skips extraction of whether the device has a tray which is propagated into internal structures, which in turn broke cdrom media change as the code thought there's no tray for the device. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2166411 Fixes: 5ef2582646eb98af208ce37355f82bdef39931fa Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Kristina Hanicova <khanicov> Thanks for bringing the good news Peter! Tested on libvirt-9.0.0-5.el9.x86_64 qemu-kvm-7.2.0-8.el9.x86_64. PASS Test pass on libvirt-9.0.0-5.el9.x86_64 qemu-kvm-7.2.0-8.el9.x86_64 Covered by the tests of libvirt-RHEL-9.2-runtest-x86_64-function-attach_detach_media 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 (libvirt bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2023:2171 |