Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-07-11 Thread Tobias Hunger
Hello again!

I just made some progress: I tracked this down to agetty settings in
the container:

When I add --autologin USER to the agetty command line in
container-getty@.service, then the return key stops working.

I am not 100% sure, but I think that is due to magic in agetty: When
reading the username it does try to detect parity and other things,
incl. what the return key actually is. Autologin prevent thats magic
from happening by stopping agetty from asking for a username.

The magic is implemented inside the get_logname function (detection
part) and then termio_final function of term-utils/agetty.c in
util-linux. Apparently there is no command line option to set this, so
I am stuck and probably need to disable autologin again:-/

Does access to a console in a container really need to go through some
simulated serial line where both sides need to build agreement on
things like parity of the bytes sent back and forth? It is really
surprising that this works mostly reliably! You should really consider
to add a getty to systemd that does just away with all the crap that
has been standardized decades ago anyway.

Best Regards,
Tobias


On Wed, Jun 24, 2015 at 8:30 PM, Tobias Hunger tobias.hun...@gmail.com wrote:
 Hi Lennart,

 sorry, this took a bit longer than expected, but I took the time to
 upgrade to systemd 221, so the results should be a bit closer to the
 current state than before (which was still using systemd 219).

 Inside container (broken shell/fish):

 speed 38400 baud; rows 60; columns 184; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
 rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke

 Inside container (working shell/bash):

 speed 38400 baud; rows 60; columns 184; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
 rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke

 Outside container:

 speed 38400 baud; rows 60; columns 184; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
 rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 -isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt echoctl echoke


 Diff inside/outside:
 opost/-opost isig/-isig icanon/-icanon echo/-echo -echoctl/echoctl


 I am not 100% sure I did gather this data correctly though: Systemd
 had already brought up the machine during boot, so I just ran
 machinectl login and then did the stty commands there.

 I also did not log out to switch between fish and bash, I just started
 bash from fish, so I am not surprised that the results are -- to my
 untrained eye -- identical for these two cases.

 Running ssty -a -F /dev/pts/2 in another konsole window did produce
 some differences.

 It does not seem to effect the result in any way whether or not I run
 this in konsole or xterm.

 I got this on a laptop, so if you want to play with a machine that
 shows this behavior I can demonstrate it if that help:-)

 Best Regards,
 Tobias


 On Fri, Jun 19, 2015 at 10:15 AM, Tobias Hunger tobias.hun...@gmail.com 
 wrote:
 Thanks for the reply!

 I'll try to collect all requested info tonight or over the weekend.

 Best Regards,
 Tobias

 On Thu, Jun 18, 2015 at 9:24 PM, Lennart Poettering
 lenn...@poettering.net wrote:
 On Tue, 26.05.15 21:40, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 This is stty -a from outside the container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
 eol2 = M-^?; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
 

Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-06-24 Thread Tobias Hunger
Hi Lennart,

sorry, this took a bit longer than expected, but I took the time to
upgrade to systemd 221, so the results should be a bit closer to the
current state than before (which was still using systemd 219).

Inside container (broken shell/fish):

speed 38400 baud; rows 60; columns 184; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl echoke

Inside container (working shell/bash):

speed 38400 baud; rows 60; columns 184; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl echoke

Outside container:

speed 38400 baud; rows 60; columns 184; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
-opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke


Diff inside/outside:
opost/-opost isig/-isig icanon/-icanon echo/-echo -echoctl/echoctl


I am not 100% sure I did gather this data correctly though: Systemd
had already brought up the machine during boot, so I just ran
machinectl login and then did the stty commands there.

I also did not log out to switch between fish and bash, I just started
bash from fish, so I am not surprised that the results are -- to my
untrained eye -- identical for these two cases.

Running ssty -a -F /dev/pts/2 in another konsole window did produce
some differences.

It does not seem to effect the result in any way whether or not I run
this in konsole or xterm.

I got this on a laptop, so if you want to play with a machine that
shows this behavior I can demonstrate it if that help:-)

Best Regards,
Tobias


On Fri, Jun 19, 2015 at 10:15 AM, Tobias Hunger tobias.hun...@gmail.com wrote:
 Thanks for the reply!

 I'll try to collect all requested info tonight or over the weekend.

 Best Regards,
 Tobias

 On Thu, Jun 18, 2015 at 9:24 PM, Lennart Poettering
 lenn...@poettering.net wrote:
 On Tue, 26.05.15 21:40, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 This is stty -a from outside the container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
 eol2 = M-^?; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
 -ixon -ixoff -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt echoctl echoke

 This is stty -a inside the nspawn-container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke

 The difference is:
 eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

 Sorry for the late reply...

 Hmm, I think the most interesting info would actually be to see stty
 -a from a working instance, and from a non-working
 instance. I.e. start the container, log into it, type stty -a command when
 everything works, and when it doesn't, and let me know the diff of it.

 Also, right after doing the stty -a in the 

Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-06-19 Thread Tobias Hunger
Thanks for the reply!

I'll try to collect all requested info tonight or over the weekend.

Best Regards,
Tobias

On Thu, Jun 18, 2015 at 9:24 PM, Lennart Poettering
lenn...@poettering.net wrote:
 On Tue, 26.05.15 21:40, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 This is stty -a from outside the container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
 eol2 = M-^?; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
 -ixon -ixoff -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt echoctl echoke

 This is stty -a inside the nspawn-container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke

 The difference is:
 eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

 Sorry for the late reply...

 Hmm, I think the most interesting info would actually be to see stty
 -a from a working instance, and from a non-working
 instance. I.e. start the container, log into it, type stty -a command when
 everything works, and when it doesn't, and let me know the diff of it.

 Also, right after doing the stty -a in the container, please run the
 same commands on the host, in a seperate xterm, but connect to the
 host side container tty using stty -a -F /dev/pts/xyz, where
 /dev/pts/xyz is the pts that nspawn itself is running on.

 Or to explain it in more steps:

 a) open an xterm of some form

 b) type tty into it, and remember the pty name it responds. It
should be something like /dev/pts/xyz.

 c) now run systemd-nspawn inside the xterm, and login there, then type
stty -a in it, and save the output that command generated
somewhere.

 d) now, leave everything as it is now, open a second xterm. In it run
stty -a -F /dev/pts/xyz, replacing /dev/pts/xyz with the pty
name from step b) and save the output somwhere.

 Then, close both xterms. Do these steps once for a container where
 things work, and once for a container where things are borked. Then
 let me know the diffs between the working and non-working outputs from
 both runs of c), as we as the diffs between the working and
 non-working outputs from both runs of d).

 Make sure you take the stty snapshots at the exact same states each
 time, because shells and so on tend to toggle some bits of it
 depending on whether they are in the fg or not...

 Also, it would be good, to check if different xterm implementations
 (gnome, kde, original xterm) behave differently.

 Lennart

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


Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-06-18 Thread Lennart Poettering
On Tue, 26.05.15 21:40, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 This is stty -a from outside the container:
 
 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
 eol2 = M-^?; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
 -ixon -ixoff -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt echoctl echoke
 
 This is stty -a inside the nspawn-container:
 
 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke
 
 The difference is:
 eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

Sorry for the late reply...

Hmm, I think the most interesting info would actually be to see stty
-a from a working instance, and from a non-working
instance. I.e. start the container, log into it, type stty -a command when
everything works, and when it doesn't, and let me know the diff of it.

Also, right after doing the stty -a in the container, please run the
same commands on the host, in a seperate xterm, but connect to the
host side container tty using stty -a -F /dev/pts/xyz, where
/dev/pts/xyz is the pts that nspawn itself is running on.

Or to explain it in more steps:

a) open an xterm of some form

b) type tty into it, and remember the pty name it responds. It
   should be something like /dev/pts/xyz.

c) now run systemd-nspawn inside the xterm, and login there, then type
   stty -a in it, and save the output that command generated
   somewhere.

d) now, leave everything as it is now, open a second xterm. In it run
   stty -a -F /dev/pts/xyz, replacing /dev/pts/xyz with the pty
   name from step b) and save the output somwhere.

Then, close both xterms. Do these steps once for a container where
things work, and once for a container where things are borked. Then
let me know the diffs between the working and non-working outputs from
both runs of c), as we as the diffs between the working and
non-working outputs from both runs of d).

Make sure you take the stty snapshots at the exact same states each
time, because shells and so on tend to toggle some bits of it
depending on whether they are in the fg or not...

Also, it would be good, to check if different xterm implementations
(gnome, kde, original xterm) behave differently.

Lennart

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


Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-05-30 Thread Tobias Hunger
Lennart,

this apparently is a problem with machinectl login: If I just use

nsenter --target PID --mount --uts --ipc --net

as root the return key works fine.

TERM=xterm with nsenter (no surprise considering that I run that from
a xterm;-), while it is vt220 in machinectl.

Any ideas?

Best Regards,
Tobias


On Tue, May 26, 2015 at 9:40 PM, Tobias Hunger tobias.hun...@gmail.com wrote:
 This is stty -a from outside the container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
 eol2 = M-^?; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
 -ixon -ixoff -iuclc ixany imaxbel -iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt echoctl echoke

 This is stty -a inside the nspawn-container:

 speed 38400 baud; rows 46; columns 114; line = 0;
 intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
 eol2 = undef; swtch = undef; start = ^Q;
 stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
 min = 1; time = 0;
 -parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
 -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
 -ixon -ixoff -iuclc -ixany -imaxbel iutf8
 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 
 ff0
 isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
 -echoprt -echoctl echoke

 The difference is:
 eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

 stty -F /dev/ptmx is identical inside and outside of the container --
 but I am not sure whether that is what you were asking in the second
 part of your reply.

 I tried running stty eol ^D -F /dev/pts/0 inside the container and
 got a SIGSEGV. It works outside the container.

 Best Regards,
 Tobias


 On Tue, May 26, 2015 at 4:11 PM, Lennart Poettering
 lenn...@poettering.net wrote:
 On Sat, 23.05.15 00:09, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 Hello,

 I am having a problem with one of my containers set up with
 systemd-nspawn. For some reason the return key will not work most of
 the time (19 out of 20 attemps) after doing machinectl login into that
 machine.

 This effects not all programs: bash works, fish-shell does not. Sudo
 password entry does not work either. Git is broken (but hardly ever
 requires user input, so that is not that tragic;-), vi works fine.

 I only have this one one container image, even though it is built
 based on an image that is also used by container images that work
 fine. So I think the image should have all the important bits and
 pieces in place.

 I am kind of lost that close to the termcap:-) Does somebody have any
 ideas on how I can debug this?

 What does stty -a say?

 Consider comparing stty on the pty master (host side) as well as the
 pty itself (container size) in the cases where this works, and where
 it does not.

 Lennart

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


Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-05-26 Thread Tobias Hunger
This is stty -a from outside the container:

speed 38400 baud; rows 46; columns 114; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?;
eol2 = M-^?; swtch = undef; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl
-ixon -ixoff -iuclc ixany imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt echoctl echoke

This is stty -a inside the nspawn-container:

speed 38400 baud; rows 46; columns 114; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef;
eol2 = undef; swtch = undef; start = ^Q;
stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O;
min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl
-ixon -ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl echoke

The difference is:
eol, eol2, -icrnl -ixany -imaxbel iutf8 -iexten -echoctl

stty -F /dev/ptmx is identical inside and outside of the container --
but I am not sure whether that is what you were asking in the second
part of your reply.

I tried running stty eol ^D -F /dev/pts/0 inside the container and
got a SIGSEGV. It works outside the container.

Best Regards,
Tobias


On Tue, May 26, 2015 at 4:11 PM, Lennart Poettering
lenn...@poettering.net wrote:
 On Sat, 23.05.15 00:09, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 Hello,

 I am having a problem with one of my containers set up with
 systemd-nspawn. For some reason the return key will not work most of
 the time (19 out of 20 attemps) after doing machinectl login into that
 machine.

 This effects not all programs: bash works, fish-shell does not. Sudo
 password entry does not work either. Git is broken (but hardly ever
 requires user input, so that is not that tragic;-), vi works fine.

 I only have this one one container image, even though it is built
 based on an image that is also used by container images that work
 fine. So I think the image should have all the important bits and
 pieces in place.

 I am kind of lost that close to the termcap:-) Does somebody have any
 ideas on how I can debug this?

 What does stty -a say?

 Consider comparing stty on the pty master (host side) as well as the
 pty itself (container size) in the cases where this works, and where
 it does not.

 Lennart

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


Re: [systemd-devel] nspawn: No Return key in machinectl login?

2015-05-26 Thread Lennart Poettering
On Sat, 23.05.15 00:09, Tobias Hunger (tobias.hun...@gmail.com) wrote:

 Hello,
 
 I am having a problem with one of my containers set up with
 systemd-nspawn. For some reason the return key will not work most of
 the time (19 out of 20 attemps) after doing machinectl login into that
 machine.
 
 This effects not all programs: bash works, fish-shell does not. Sudo
 password entry does not work either. Git is broken (but hardly ever
 requires user input, so that is not that tragic;-), vi works fine.
 
 I only have this one one container image, even though it is built
 based on an image that is also used by container images that work
 fine. So I think the image should have all the important bits and
 pieces in place.
 
 I am kind of lost that close to the termcap:-) Does somebody have any
 ideas on how I can debug this?

What does stty -a say?

Consider comparing stty on the pty master (host side) as well as the
pty itself (container size) in the cases where this works, and where
it does not.

Lennart

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