[Bug 685593] New: libvirt/qemu_kvm fails to open serial device as type 'file'
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c0 Summary: libvirt/qemu_kvm fails to open serial device as type 'file' Classification: openSUSE Product: openSUSE 11.4 Version: Final Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: pmullaney@novell.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.0) Gecko/20100101 Firefox/4.0 When configuring a serial port device as type file under libvirt, such as: <serial type="file"> <source path='/var/lib/nova/instances/instance-00000009/console.log'/> <target port='1'/> </serial>> I get the following error: virsh # start instance-00000009 error: Failed to start domain instance-00000009 error: internal error Process exited while reading console log output: qemu_open: name /var/lib/nova/instances/instance-00000009/console.log flags 1101 mode 666 qemu_open: ret -1 errno 13 error Permission denied chardev: bad fd -1 chardev: opening backend "file" failed I have traced the permission denied error to qemu-char.c in kvm - in qemu_chr_open_file_out, the open of the specified file fails. I have noticed that the file seems to exist at the time of the open call but does not exist before the start in libvirt. Reproducible: Always Steps to Reproduce: 1. Using the attached instance-00000009 tarball 2. untar in /var/lib/nova/instances/ 3. use virsh to define instance-00000009 and start -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c3 --- Comment #3 from Christoph Thiel <cthiel@novell.com> 2011-05-19 09:17:09 UTC --- There is also an upstream bug for this: https://bugzilla.redhat.com/show_bug.cgi?id=593577 and a bug in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/578527 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c4 --- Comment #4 from Christoph Thiel <cthiel@novell.com> 2011-05-19 09:54:12 UTC --- https://launchpadlibrarian.net/68303110/9905-fix-apparmor-serial-permissions... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c5 --- Comment #5 from Christoph Thiel <cthiel@novell.com> 2011-05-19 13:39:10 UTC --- We used this hack/workaround to get it to work. It was also needed when AA was disabled. --- /usr/lib/python2.7/site-packages/nova/virt/libvirt_conn.py~ 2011-04-15 04:57:52.000000000 +0200 +++ /usr/lib/python2.7/site-packages/nova/virt/libvirt_conn.py 2011-05-19 15:36:23.076873203 +0200 @@ -823,6 +823,9 @@ os.close(os.open(basepath('console.log', ''), os.O_CREAT | os.O_WRONLY, 0660)) + utils.execute('chmod', '777', basepath(suffix='')) + utils.execute('chmod', '666', basepath('console.log', '')) + user = manager.AuthManager().get_user(inst['user_id']) project = manager.AuthManager().get_project(inst['project_id']) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c6 --- Comment #6 from Christoph Thiel <cthiel@novell.com> 2011-05-20 11:59:15 UTC --- I tried with libvirt 0.9.1, which already includes this patch and don't seem to need our hack/workaround anymore. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c7 James Fehlig <jfehlig@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |pmullaney@novell.com --- Comment #7 from James Fehlig <jfehlig@novell.com> 2011-05-20 14:46:39 UTC --- Is an update required for libvirt 0.8.8 in 11.4? Although honestly, without further digging, I'm not sure what the fix is. The patch in #5 is a hack to another package. The patch in Ubuntu bug 578527 is already in libvirt 0.8.8. In RH bug 593577, Jamie claims it's an apparmor issue. Patrick, does libvirt 0.9.1 solve the issue for you? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c8 --- Comment #8 from Patrick Mullaney <pmullaney@novell.com> 2011-05-24 22:06:39 UTC --- (In reply to comment #7)
Is an update required for libvirt 0.8.8 in 11.4? Although honestly, without further digging, I'm not sure what the fix is. The patch in #5 is a hack to another package. The patch in Ubuntu bug 578527 is already in libvirt 0.8.8. In RH bug 593577, Jamie claims it's an apparmor issue.
Patrick, does libvirt 0.9.1 solve the issue for you?
Jim, it seems like upgrading to libvirt 0.9.1 solves the problem. And putting my system back to 0.8.8 brings it back. I really didn't expect it to be libvirt, I suspected qemu. My testing is with apparmor disabled(from yast's toplevel checkbox for apparmor, I hope this turns it off!). Thanks for the suggestion. Sorry I could not narrow it down further. If you'd like to see the problem in action, let me know. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c Patrick Mullaney <pmullaney@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|pmullaney@novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c Ihno Krumreich <ihno@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low CC| |ihno@novell.com OS/Version|All |openSUSE 11.4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=685593 https://bugzilla.novell.com/show_bug.cgi?id=685593#c9 James Fehlig <jfehlig@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |Factory --- Comment #9 from James Fehlig <jfehlig@suse.com> 2011-12-09 22:14:24 UTC --- The upstream fix for this issue is http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2e5e614e6b3b7407fe8741a.... I don't plan to add this to 11.4 since the fix is in 12.1 and available in the libvirt package from OBS Virtualization project. I'll reconsider if folks make enough noise :-). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com