FS#45094 - [systemd] Cannot login to machinectl container

Attached to Project: Arch Linux
Opened by Otavio Salvador (otavio) - Tuesday, 26 May 2015, 15:07 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 08 March 2016, 13:36 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Dave Reisner (falconindy)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

With systemd 219 you cannot login into a running nspawn-container using machinectl login:

# machinectl login arch-container
Failed to get machine PTY: Input/output error


Versions:

otavio@nano ~ % pacman -Q systemd
systemd 219-6
This task depends upon

Closed by  Dave Reisner (falconindy)
Tuesday, 08 March 2016, 13:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  Reported fixed by reporter.
Comment by Otavio Salvador (otavio) - Thursday, 28 May 2015, 12:10 GMT
Is there any other information useful?

Comment by Tobias Hunger (hunger) - Friday, 12 June 2015, 14:09 GMT
Machinectl login works fine for me -- minus the return key, which is just ignored by many applications.

The only pty-related issue I ran into that I can still remember is /etc/securetty.conf. Did you fix up that file in the container?

It needs to allow logins from pts/0 (and probably also 1, 2, ... ).
Comment by Otavio Salvador (otavio) - Monday, 15 June 2015, 12:50 GMT
I tested this with mine Debian Jessie installation.

I added:

# host
pts/0
pts/1
pts/2

In /etc/securetty.

and I ran:

otavio@nano ~ % sudo machinectl start debian-jessie
otavio@nano ~ % sudo machinectl login debian-jessie
Failed to get machine PTY: Input/output error

Do you have any hint how to inquire more information to try to narrow down the root cause?
Comment by Christian Rebischke (Shibumi) - Monday, 07 March 2016, 17:44 GMT
I have created a bugreport upstream:

https://github.com/systemd/systemd/issues/2808
Comment by Christian Rebischke (Shibumi) - Monday, 07 March 2016, 18:30 GMT
Ok I have a solution for the problem.
It seems like machinectl start is not initialising the container.
When I first bootup the container via systemd-nspawn -b -D <container> -n
and then I do machinectl login <container> it's working!
Comment by Dave Reisner (falconindy) - Monday, 07 March 2016, 19:56 GMT
Seems like the error message could be improved, then, but there's not really much of a bug here... Is that correct?
Comment by Christian Rebischke (Shibumi) - Tuesday, 08 March 2016, 00:51 GMT
@dave
the OP should paste us the output of `machinectl status <container>`.
I am sure that there is no `/dev/*` in his container. (seems like nspawn is creating this at first boot).
And how does OP created the container? I had similiar issues when I've used mkarchroot..
when I've used pacstrap instead it was fine..

Loading...