Skip to content

Commit

Permalink
libpod: make conmon always log to syslog
Browse files Browse the repository at this point in the history
Conmon very early dups the std streams with /dev/null, therefore all
errors it reports go nowhere. When you run podman with debug level we
set --syslog and we can see the error in the journal. This should be
the default. We have a lot of weird failures in CI that could be caused
by conmon and we have access to the journal in the cirrus tasks so that
should make debugging much easier.

Conmon still uses the same logging level as podman so it will not spam
the journal and only log warning and errors by default.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Jun 14, 2023
1 parent d7b72f4 commit 13c2aca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libpod/oci_conmon_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1387,10 +1387,8 @@ func (r *ConmonOCIRuntime) sharedConmonArgs(ctr *Container, cuuid, bundlePath, p
logLevel := logrus.GetLevel()
args = append(args, "--log-level", logLevel.String())

if logLevel == logrus.DebugLevel {
logrus.Debugf("%s messages will be logged to syslog", r.conmonPath)
args = append(args, "--syslog")
}
logrus.Debugf("%s messages will be logged to syslog", r.conmonPath)
args = append(args, "--syslog")

size := r.logSizeMax
if ctr.config.LogSize > 0 {
Expand Down

0 comments on commit 13c2aca

Please sign in to comment.