Skip to content

Commit

Permalink
quadlet: Switch log-driver to passthrough
Browse files Browse the repository at this point in the history
This is much better for the systemd case becase we pass the journal
socket fds directly to the container. This means less copying of the
logs, but it also means the journal will correctly get the peer
process id when it tries to extract things like the name of what
is logging something.

With this we correctly name the logging process rather than claim
everything comes from conmon.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
  • Loading branch information
alexlarsson committed Oct 20, 2022
1 parent c7cbe54 commit 69198ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile
"-d",

// But we still want output to the journal, so use the log driver.
// TODO: Once available we want to use the passthrough log-driver instead.
"--log-driver", "journald",
"--log-driver", "passthrough",

// Never try to pull the image during service start
"--pull=never")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/basic.container
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## assert-podman-args "--rm"
## assert-podman-args "--replace"
## assert-podman-args "-d"
## assert-podman-args "--log-driver" "journald"
## assert-podman-args "--log-driver" "passthrough"
## assert-podman-args "--pull=never"
## assert-podman-args "--init"
## assert-podman-args "--runtime" "/usr/bin/crun"
Expand Down

0 comments on commit 69198ff

Please sign in to comment.