Re: [PATCH 1/2] Fix occasional container creation failure due to misuse of grantpt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 12, 2011 at 09:31:28PM -0500, Serge E. Hallyn wrote:
> glibc's grantpt and ptsname cannot be used on a fd for a pty not in
> /dev/pts.  The lxc controller tries to do just that.  So if you try to
> start a container on a system where /dev/pts/0 is not available, it
> will fail.  You can make this happen by opening a terminal on
> /dev/pts/0, and doing 'sleep 2h & disown; exit'.  To fix this, I call
> the virFileOpenTtyAt() from a forked task in a new mount ns, and first
> mount the container's /dev/pts onto /dev/pts.  (Then the opened fd must
> be passed back to the lxc driver).  Another solution would be to just
> do it all by hand without grantpt and ptsname.


GNULIB already has a 'grantpt' implementation for MinGW, OpenBSD
and OS-X. So I wonder if they would like to fix the broken Linux
glibc version too ?

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]