[pkg-lxc-devel] Bug#907615: lxc-console not getting prompt with debian template

Pierre-Elliott Bécue peb at debian.org
Fri Jan 11 12:57:22 GMT 2019


Hi Alex,

Le 11/01/2019 à 10:59, Alex Mestiashvili a écrit :
> On 1/10/19 11:52 PM, Pierre-Elliott Bécue wrote:
>> Hi,
>>
>> Le jeudi 30 août 2018 à 09:58:31+0200, Alex Mestiashvili a écrit :
>>> Package: lxc
>>> Version: 1:2.0.9-6
>>> Severity: normal
>>>
>>>
>>> Steps to reproduce:
>>>
>>> install lxc, create a container with debian template (backing store
>>> doesn't matter in this case)
>>>
>>> lxc-create -n deb2 -t debian -B zfs --zfsroot=ocz/lxc
>>>
>>> lxc-console -n deb2 -l trace -o console_deb2.lxc.log
>>
>> Why using -l, which tend to ruin the interface and hence compromise the
>> readability of the output?
> 
> Well, -l is for the logpriority, that's why it is there. Sorry if that
> was useless.

I'm pretty sorry if I gave you the impression that it was useless. My
intent was more to suggest that as this output lacks sufficient intel,
you can get rid of it. :)

> I just gave it another try. And I think I narrowed down the issue with
> the template.

With what version of lxc did you give it another try?

> When attaching to a newly created debian container (lxc-create -t
> debian) with lxc-attach -n <container> I can see that there is only 1
> console and no ttys are spawned:
> 
> root at deb2:/etc# ps -ef | grep agetty
> root        73     1  0 09:42 console  00:00:00 /sbin/agetty --noclear
> --keep-baud console 115200,38400,9600 vt220
> 
> While in an ubuntu template there are 1 console and 4 pts:
> 
> ps -ef | grep agetty
> root       102     1  0 08:58 pts/0    00:00:00 /sbin/agetty --noclear
> --keep-baud pts/0 115200 38400 9600 vt220
> root       103     1  0 08:58 console  00:00:00 /sbin/agetty --noclear
> --keep-baud console 115200 38400 9600 vt220
> root       104     1  0 08:58 pts/3    00:00:00 /sbin/agetty --noclear
> --keep-baud pts/3 115200 38400 9600 vt220
> root       105     1  0 08:58 pts/1    00:00:00 /sbin/agetty --noclear
> --keep-baud pts/1 115200 38400 9600 vt220
> root       106     1  0 08:58 pts/2    00:00:00 /sbin/agetty --noclear
> --keep-baud pts/2 115200 38400 9600 vt220
> 
> So my initial bug report wasn't exactly correct.
> One can get login prompt on container created with debian template, but
> only by calling lxc-console -n <container> -t 0
> 
> This "-t 0" is not obvious and I can imagine some people don't know
> about it.
> 
> lxc and lxc-console are totally ok. It's the debian template with
> systemd which is by default have a not optimal setup.
> No idea how to fix that, spent some time, but lost in systemd
> crosslinked docs.

This is interesting, but I'm surprised, I'm not meeting such an issue,
my Debian containers work perfectly fine.

Do you get any message? Can you use trace on lxc-create and log all of
this in a file?

-- 
PEB



More information about the Pkg-lxc-devel mailing list