TTY error on CentOS 6 container


(Konstantin) #1

Hey,

I'm not sure if this is a bug, that's why i'll ask here first.

I've seen in all of my centos 6 containers the following error in /var/log/messages

Nov 2 16:37:07 web init: tty (console) main process (17253) terminated with status 1
Nov 2 16:37:07 web init: tty (console) main process ended, respawning
Nov 2 16:37:07 web init: tty (/dev/tty[1-6]) main process (17254) terminated with status 1
Nov 2 16:37:07 web init: tty (/dev/tty[1-6]) main process ended, respawning
Nov 2 16:37:07 web /sbin/mingetty[17256]: console: vhangup() failed
Nov 2 16:37:07 web /sbin/mingetty[17257]: tty[1-6]: No such file or directory

Is this a LXD/LXC/LXCFS bug or something that i haven't setup correctly?

Thanks!


(Konstantin) #2

Latest versions of ubuntu (host machine) lxd and lxcfs.

If a clean centos6 template is used it will be reproduces.


(Christian Brauner) #3

LXD doesn't configure ttys by default only the container's /dev/console but there seems to be an init job to run gettys and they are complaining about missing ttys. It's not serious at all.


(Konstantin) #4

Yeah, I know it is not serious, i've running over an year like this :slight_smile: :slight_smile: :slight_smile:

But developers are logging some application logs in /var/log/messages and it is bugging them and they are bugging me

Is there some work around or?


(Konstantin) #5

I've found a "solution"
open /etc/init/tty.conf
and comment out

respawn
instance $TTY
exec /sbin/mingetty $TTY

The logs stopped.

I will watch over closely if some regressions occur.


(Stéphane Graber) #6

I'd recommend:

echo manual > /etc/init/start-ttys.override
reboot

That should disable the upstart job that spawns those.


(Stéphane Graber) #7

Hmm, or not, I wonder if the upstart version in centos is too old for that...


(Stéphane Graber) #8

Working alternative:

echo ACTIVE_CONSOLES= >> /etc/sysconfig/init
reboot