[Bug 863629] Re: libvirt-lxc: virFileOpenTtyAt can't be called on /some/other/dev/pts
Clint Byrum
clint at fewbar.com
Tue Nov 8 23:58:37 UTC 2011
Nothing here to sponsor, removing ubuntu-sponsors.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/863629
Title:
libvirt-lxc: virFileOpenTtyAt can't be called on /some/other/dev/pts
Status in “libvirt” package in Ubuntu:
Fix Released
Status in “libvirt” source package in Lucid:
New
Status in “libvirt” source package in Maverick:
New
Status in “libvirt” source package in Natty:
New
Status in “libvirt” source package in Oneiric:
Fix Committed
Bug description:
lxcControllerRun() is calling virFileOpenTtyAt() with a slave opened
on /the/container/chroot/dev/pts. While it is not documented in the
manpages, glibc's grantpt does a first check (ensuring that the passed
in fd is a pty slave) with '/dev/pts' as the hardcoded path, appending
the pty#.
lxcControllerRun always calls this on the first slave opened after
creating the new /dev/pts, so grantpt is always checking /dev/pts/0.
Therefore, if your host does not have /dev/pts/0 (easy to reproduce
using screen), then grantpt will fail, and the container creation will
subsequently also fail.
=================================================================
SRU Justification:
1. Impact: libvirt will be unable to create lxc containers, saying that it cannot allocate /dev/pts/0
2. Development fix: A patch was sent upstream which makes libvirt-lxc not use glibc's grantpt, which is the cause of the bug.
3. Stable fix: same as the development fix.
4. Test case:
0. [ Set up libvirt and create a libvirt-lxc container ]
1. make sure noone is logged into the server
2. log in, make sure your tty is /dev/pts/0 (check with 'tty')
3. Pin /dev/pts/0 by doing "sleep 2h & disown; exit"
4. Try to start a container on that system. Without this fix it will fail with an error about /dev/pts/0.
5. Regression potential: if the patch was bad, it could cause failures when starting a container, or other places when libvirt allocates a tty.
=================================================================
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/863629/+subscriptions
More information about the Ubuntu-sponsors
mailing list