Bug 982317
Summary: | cannot open /dev/tty inside container | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Jenner <mjenner> | ||||
Component: | libvirt | Assignee: | Eric Blake <eblake> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 19 | CC: | berrange, clalancette, crobinso, dimitris.on.linux, dwalsh, eblake, geertj, itamar, jforbes, jyang, laine, libvirt-maint, tomek, veillard | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-1.0.5.5-1.fc19 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-08-06 23:35:19 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: | |||||||
Attachments: |
|
Description
Martin Jenner
2013-07-08 16:15:54 UTC
Created attachment 770608 [details]
This patch creates /dev/tty within a container.
This is a libvirt bug not a libvirt-sandbox.
commit 9a0ac6d9c21b914f887d2a1e0051b5beffa81bd7 Author: Richard Weinberger <richard> Date: Tue Jul 9 11:05:14 2013 +0100 LXC: Create /dev/tty within a container libvirt-1.0.5.3-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/libvirt-1.0.5.3-1.fc19 Package libvirt-1.0.5.3-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libvirt-1.0.5.3-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12938/libvirt-1.0.5.3-1.fc19 then log in and leave karma (feedback). 1.0.5.4 is heading to stable now, which fixes this. Note that in version 1.0.5.4, for some reason the bug is not fixed correctly. This version creates a /tty, not a /dev/tty. The attached patch will properly fix it: --- libvirt-1.0.5.4/src/lxc/lxc_container.c.orig 2013-07-29 21:10:08.138088891 +0200 +++ libvirt-1.0.5.4/src/lxc/lxc_container.c 2013-07-29 21:10:21.117815031 +0200 @@ -839,7 +839,7 @@ { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" }, { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" }, { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" }, - { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/tty" }, + { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/dev/tty" }, }; const struct { const char *src; (In reply to Geert Jansen from comment #6) > Note that in version 1.0.5.4, for some reason the bug is not fixed > correctly. This version creates a /tty, not a /dev/tty. The attached patch > will properly fix it: > > --- libvirt-1.0.5.4/src/lxc/lxc_container.c.orig 2013-07-29 > 21:10:08.138088891 +0200 > +++ libvirt-1.0.5.4/src/lxc/lxc_container.c 2013-07-29 21:10:21.117815031 > +0200 > @@ -839,7 +839,7 @@ > { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" }, > { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" }, > { LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" }, > - { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/tty" }, > + { LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/dev/tty" }, > }; > const struct { > const char *src; Can you also post this to libvir-list? It would be nice to get this fixed in the 1.1.1 release. (In reply to Eric Blake from comment #7) > Can you also post this to libvir-list? It would be nice to get > this fixed in the 1.1.1 release. Upstream has already fixed htis. Device creation moved to lxc_controller.c and and table entries now have the "/dev" prefixes got removed. Good to know - that just means we botched things when backporting to v1.0.5-maint. I'll take a look at fixing it. Cole's next release on the 1.0.5.x maint series will include this: commit a10d077ef202d35b62d586e2356ce507e4ca6135 Author: Eric Blake <eblake> Date: Mon Jul 29 15:45:25 2013 -0600 lxc: correctly backport /dev/tty fix https://bugzilla.redhat.com/show_bug.cgi?id=982317 maint-only patch; reported by Geert Jansen Commit 17cdc298 tried to backport upstream 90a0c6d, but in resolving conflicts, failed to account that upstream commit e1d32bb refactored code to leave off a leading /dev. * src/lxc/lxc_container.c (lxcContainerPopulateDevices): Use correct device name. Signed-off-by: Eric Blake <eblake> libvirt-1.0.5.5-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/libvirt-1.0.5.5-1.fc19 Package libvirt-1.0.5.5-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libvirt-1.0.5.5-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-14127/libvirt-1.0.5.5-1.fc19 then log in and leave karma (feedback). Works for me. I have added Karma to the update. Thanks for the quick fix! *** Bug 993733 has been marked as a duplicate of this bug. *** libvirt-1.0.5.5-1.fc19 fixed bug 993733 for me. Thanks. libvirt-1.0.5.5-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 994280 has been marked as a duplicate of this bug. *** |