[lxc-devel] lxc-console problem with 0 tty but "the console"
Stéphane Graber
stgraber at ubuntu.com
Tue Apr 1 14:59:24 UTC 2014
On Tue, Apr 01, 2014 at 02:49:35PM +0200, Guillaume ZITTA wrote:
> Hi,
>
> In lxc-gentoo template, I supposed that in a ssh world more than 1
> tty is overkill.
> So, by default lxc-gentoo use only the "console", no additionnal tty
>
> I didn't figure out that, by default, lxc-console tries to connect
> to the first tty.
> This lead to poor user experience :
>
> # lxc-console -n testconsole
> lxc_container: console -1 invalid,busy or all consoles busy
>
> # lxc-console -n testconsole -t 0
> ..working console
>
> I have two solutions to fix this and I wanted to ask before work in
> the wrong direction :
> - patch lxc-console to try "-t 0" if the default "-t 1" fails
> My favorite, it's a pitty to fail when there is a working console.
> I don't know how to do it, but I'll figure out.
>
> - patch lxc-gentoo template to provide at least 1 additionnal tty
> Easy but, not my favorite
>
> What do you think ?
Hi,
I believe the reason why lxc-console attaches to tty1 instead of tty0 is
because tty0 is used by lxc-start when not daemonized, so lxc-console -n
<container> -t 0 will fail unless you started the container with -d.
I'd therefore recommend you provide an extra tty for the Gentoo template.
>
> Guillaume ZITTA
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140401/212c953d/attachment.pgp>
More information about the lxc-devel
mailing list