On Mon, 16.12.13 12:03, Daniel P. Berrange (berra...@redhat.com) wrote:

> > Note that this *really* only supports ptys, not any other kinds of ttys,
> > sinc for those we require propery device enumeration and notification
> > and we don't have those in containers... I still chose to name this
> > $container_ttys rather than $container_ptys, so that maybe one day we
> > can extend it should devices like this ever get virtualized.
> > 
> > This will be in systemd 209.
> 
> I've tested this with libvirt and it worked except for one small edge
> case.
> 
> Say libvirt creates 3 consoles /dev/pts/0, /dev/pts/1 and /dev/pts/2.
> Now we set  container_ttys="pts/0 pts/1 pts/2" Systemd starts up 3
> agetty processes - one of each of these.
> 
> The /dev/console device, however, is also a link to /dev/pts/0
> and so systemd starts up a agetty process for that too.
> 
> Now we have 2 agetty processes fighting over /dev/pts/0 which ends
> in tears
> 
> Is this something that systemd should detect & cope with, or should we
> document that the 'container_ttys' env *must exclude* any tty associated
> with the /dev/console device ?

I am tempted to say that we should do the latter, it's quite difficult
to figure out when they point to the same (for example, because people
use a bind mount rather than a symlink), and the roles of the console
and the other $container_ttys is quite different during boot if we want
to avoid printing logs over the getty and so on...

I added this to the wiki text now.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to