Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

respawn.log spammed with errors when there is no serial port on the machine #2466

Closed
janeczku opened this issue Sep 7, 2018 · 2 comments
Closed

Comments

@janeczku
Copy link
Contributor

janeczku commented Sep 7, 2018

RancherOS Version: (ros os version)
v1.4.0
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
vSphere

On hosts that don't one or two serial ports connected, the following errors are logged in /var/log/boot/respawn.log every 10 seconds.

$ cat respawn.log
time="2018-09-07T19:11:28Z" level=debug msg="START: [respawn -f /etc/respawn.conf] in /"
time="2018-09-07T19:11:28Z" level=info msg="respawn RancherOS
built: '2018-09-07T17:58:59Z', 289ff05"
time="2018-09-07T19:11:38Z" level=error msg="/sbin/agetty -n -l /usr/bin/autologin -o rancher:ttyS0 ttyS0 : exit status 1"
time="2018-09-07T19:11:38Z" level=error msg="/sbin/agetty -n -l /usr/bin/autologin -o rancher:ttyS1 ttyS1 : exit status 1"
(...)

The ISO and many of the other images enable autologin for one or multiple serial ports by default.

Possible fix: Check if the serial port device is actually connected to a hardware device before adding to respawn.conf.

if allowAutoLogin && strings.Contains(cmdline, fmt.Sprintf("rancher.autologin=%s", tty)) {

@niusmallnan
Copy link
Contributor

If users have installed ros to the disk via ros install, there will be no problem, because of the rancher.autologin items will be removed.

If users boot an instance via docker-machine, they will hit this issue.
This is because ttyS0 and ttyS1 are not a tty sometimes, we can check the syslog:

$ tail -f /var/log/syslog
Oct 18 05:22:59 test-respawn agetty[1764]: /dev/ttyS1: not a tty
Oct 18 05:23:09 test-respawn agetty[1765]: /dev/ttyS0: not a tty
Oct 18 05:23:09 test-respawn agetty[1766]: /dev/ttyS1: not a tty
Oct 18 05:23:19 test-respawn agetty[1767]: /dev/ttyS0: not a tty
Oct 18 05:23:19 test-respawn agetty[1768]: /dev/ttyS1: not a tty

@rootwuj
Copy link

rootwuj commented Nov 30, 2018

Version - rancher/os:v1.5.0-rc1 11/30
Verified fixed

@rootwuj rootwuj closed this as completed Nov 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants