-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bmcd logging to console causes strange behavior if controlling terminal vanished #185
Comments
having a nice syslog client inside the BMCD would be nice, Off the top of my head, I'm not sure if we have all the pieces in the firmware for this yet. However, the new firmware now logs to a file only by default. People who want to have the old behavior back can set the @j0ju which terminal client are you using? |
iterm2, kitty, Konsole, rxvt depending on the workstation I am working. Why you are asking, the client providing the tty-interface is independent, if the ssh session dies after a restart without redirecting, STDIN/OUT/ERR are broken and the application has to deal with it. Either by closng it early or to ignore those errors. Regarding a syslog client: in shell we have the util Also as a suggestion, I would enable the feature to log to a ring buffer in Busybox, than no file rotation is needed. If the BMC would also log that direction, everything is in one place, and for people that want remote logging to a central syslog, busybox syslogd also allows this (Although, I would use rsyslogd for this). This would need some rework, but might make the whole logging a bit more consistent. |
Works as expected. I am redirecting to /dev/kmsg or alternativly via
|
There are indeed some libs that can connect to a syslogd. Not much thought is put into designing a good logging system, but I'm planning to start this soon as part of #153. however, I've added a config option as well to disable the coloring for now (on default disabled) |
Describe the bug
If the controlling TTY of the bmcd process vanishes it behaves strangly on actions.
To Reproduce
Steps to reproduce the behavior:
tpi advanced msd -n 2
NOTE: the node number does not matter.
I started the process here by hand to demonstrate. The call to start-stop-daemon in /etc/init.d/S94bmcd backgrounds bmcd but keeps it attached to the local console.
Expected behavior
The operation of
tpi advanced msd -n 2
should work as expected.Versions
linux version= Linux tpi 5.4.61 #4 SMP PREEMPT Sun Jan 28 13:47:02 UTC 2024 armv7l GNU/Linux
bmc version= 2024-02-28T23:49:15.568Z INFO [bmcd] Turing Pi 2 BMC Daemon v2.0.5
Additional context
It seems to be related that the filedescriptors of STDOUT/ERR are closed/vanished when the pseudo terminal of the SSH session vanishes.
If the bmcd is doint output, eg. the state messages regarding the usb devices for msd mode, that it aborts the action without notice.
It would be nice if bmcd would log to syslog. So the messages can the be forwarded to a syslog server, promtail, loki, ...
Locally I fixed this by adding redirections to /dev/null and /dev/console:
This circumvents the issue.
When does this happen? everytime the bmcd dies upon error or when the OOMReaper goes around and you restart bmcd manually.
The text was updated successfully, but these errors were encountered: