-
Notifications
You must be signed in to change notification settings - Fork 146
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
Improve the Sysbox installer #221
Comments
Regarding the journald logging. It works only when the --log parameter is used and a filename for a logfile is given.
|
Yes this is what I had noticed when I briefly played around with this some weeks ago. I wonder if it's related to the fact that systemd sets |
Interesting issue. So the problem is that sysbox-mgr and sysbox-fs try to open the /dev/stdout filename instead writing to file descriptor 1? I am not a go programmer, but could it be that that these lines try to open the file in the wrong mode (see create flag, mode 666)? |
In Sysbox we use the Golang logrus package for logging. It seems this package has no problem logging to files (or /dev/stdout when it points to a file). But when /dev/stdout points to a socket (e.g., when logging to the systemd journal log), it apparently does not work correctly. I am speculating here a bit as I've not had the chance to take a closer look. But there must be some fairly simple way to fix this. |
One other remark: I would go for logging to stderr instead of stdout. Both are picked up by journald just fine, but if you ever decide to have an option which generates non-logging output, the separation is useful. E.g. some programs may dump their current configuration and then you would use stdout for that while still being able to log stuff in parallel. |
* Use os.Stdout if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stdout if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stdout if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
I found a way to use journald. See Merge Requests above. If you want to keep logging to logfiles by default you should add a logrotate configuration as well. |
* Use os.Stdout if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stderr if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stderr if no logging filename is given * This makes it possible to use journald by setting --log "" * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221 Signed-off-by: Andreas Wirooks <andreas.wirooks@web.de>
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221 Signed-off-by: Andreas Wirooks <andreas.wirooks@web.de>
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221 Signed-off-by: Andreas Wirooks <andreas.wirooks@web.de>
* Use os.Stderr if no logging filename is given * Set default log to "" to enable stderr output * This makes it possible to use journald by using default log value * This solution is not optimal, but keeps backwards compatibility Refs: nestybox/sysbox#221 Signed-off-by: Andreas Wirooks <andreas.wirooks@web.de>
…usr/bin' Address issue #221 requirement of changing the executables path to `/usr/bin` instead of the original `/usr/local/bin` path. Signed-off-by: Rodny Molina <rmolina@nestybox.com>
Refer to Sysbox issue [#221](nestybox/sysbox#221) for details. Signed-off-by: Rodny Molina <rmolina@nestybox.com>
Refer to Sysbox issue [#221](nestybox/sysbox#221) for details. Signed-off-by: Rodny Molina <rmolina@nestybox.com>
…usr/bin' Address issue #221 requirement of changing the executables path to `/usr/bin` instead of the original `/usr/local/bin` path. Signed-off-by: Rodny Molina <rmolina@nestybox.com>
Both of these are already implemented (since Sysbox v0.4.1 IIRC). Closing. |
The sysbox package installer could be improved as follows:
Update the Sysbox systemd units to log into the systemd journal by default, as opposed to log files (e.g., /var/log/sysbox-mgr.log).
Install executables in
/usr/bin
instead of/usr/local/bin
. The former is a more appropriate directory, and it's the directory where the binaries for docker, containerd, etc. reside.The text was updated successfully, but these errors were encountered: