Bug 641854
| Summary: | Fail to change media on the fly when host is in enforcing mode. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Johnny Liu <jialiu> |
| Component: | libvirt | Assignee: | Daniel Veillard <veillard> |
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.6 | CC: | dyuan, eblake, jdenemar, llim, tyan, virt-maint, xen-maint, xhu, yoyzhang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Previously, when a CD image with a read-only flag set was ejected from a drive on a guest, the read-only flag was preserved. Consequently, the image could not be re-attached to the drive. A patch has been provided to address this issue, and the read-write flag is now set correctly when an image is ejected from a drive, allowing CD images to be changed on-the-fly.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-10-22 13:11:58 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Johnny Liu
2010-10-11 10:11:02 UTC
It works in permissive mode and doesn't work in enforcing mode so it has to be selinux issue and you should see something about it in /var/log/audit/audit.log or even /var/log/messages. Could you check that once more? Also, could you check how it worked on 5.5, i.e. with 0.6.3-based libvirt? (In reply to comment #1) > It works in permissive mode and doesn't work in enforcing mode so it has to be > selinux issue and you should see something about it in /var/log/audit/audit.log > or even /var/log/messages. Could you check that once more? There is no any selinux log in /var/log/audit/audit.log and /var/log/messages. Only the following line is seen in /var/log/messages: .... Oct 15 00:40:25 localhost libvirtd: 00:40:25.295: error : qemuMonitorTextChangeMedia:924 : operation failed: could not change media on ide1-cd0: Could not open '/var/lib/libvirt/images/temp2.iso' > Also, could you check how it worked on 5.5, i.e. with 0.6.3-based libvirt? Yes, I tested it on rhel5u5 with libvirt-0.6.3-37.el5, it works fine. OK, I had to turn off dontaudit rules (using semodule -DB) to see what's going on:
avc: denied { write } for pid=5889 comm="qemu-kvm" name="cdrom.iso" dev=dm-1 ino=16793604 scontext=system_u:system_r:svirt_t:s0:c633,c980 tcontext=system_u:object_r:virt_content_t:s0 tclass=file
*** Bug 644763 has been marked as a duplicate of this bug. *** qemu is trying to open the cdrom image in read-write mode even though it was supposed to open it as read-only. This is actually a dub of qemu bug 586173. *** This bug has been marked as a duplicate of bug 586173 ***
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Previously, when a CD image with a read-only flag set was ejected from a drive on a guest, the read-only flag was preserved. Consequently, the image could not be re-attached to the drive. A patch has been provided to address this issue, and the read-write flag is now set correctly when an image is ejected from a drive, allowing CD images to be changed on-the-fly.
|