Thanks for the instructions on how to reproduce your case. I did run
containers in Focal and Impish in the way that you described and I
confirm that the behavior is different between them. In Focal after
bootstrapping and starting the container the lxc-console works as
expected:

ubuntu@focal:~$ sudo lxc-console -n test

Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself

Ubuntu 20.04.3 LTS test pts/0

test login: ubuntu
Password: 
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-88-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@test:~$


But in Impish the same does not happen:

ubuntu@impish:~$ sudo lxc-console -n test

Connected to tty 1
Type <Ctrl+a q> to exit the console, <Ctrl+a Ctrl+a> to enter Ctrl+a itself


Even if you try to pass another tty number there is no login prompt in the 
console, as you stated. I see you were checking for getty@.service but looking 
at the different services running inside both containers what I think we really 
want is container-getty@.service. The condition path in this service is 
/dev/pts/%I which is already satisfied in the Impish container when I logged 
in, all I had to do was starting this service and I was able to log in using 
the other tty numbers. We cannot enable this service by default because of its 
nature, so I am wondering if any of the conditions are not satisfied during the 
container boot time. In the syslog of the Focal container I can see:

Oct 26 19:48:17 test systemd[1]: Finished Permit User Sessions.
Oct 26 19:48:17 test systemd[1]: Started Console Getty.
Oct 26 19:48:17 test systemd[1]: Started Container Getty on /dev/pts/0.
Oct 26 19:48:17 test systemd[1]: Started Container Getty on /dev/pts/1.
Oct 26 19:48:17 test systemd[1]: Started Container Getty on /dev/pts/2.
Oct 26 19:48:17 test systemd[1]: Started Container Getty on /dev/pts/3.

And in the Impish one just this:

Oct 26 19:17:20 test systemd[1]: Finished Permit User Sessions.
Oct 26 19:17:20 test systemd[1]: Started Console Getty.


I did not have time to get to the bottom of this but it seems a real issue, I 
am marking this bug as Triaged and subscribing ubuntu-server for further 
investigation.

** Changed in: lxcfs (Ubuntu)
       Status: Incomplete => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1947811

Title:
  cgroups broken in impish

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxcfs/+bug/1947811/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to