Skip to content

Commit

Permalink
lxd/network/acl: Use the journalctl wrapper script introduced in th…
Browse files Browse the repository at this point in the history
…e LXD snap (#14805)

Requires canonical/lxd-pkg-snap#688

This way, we rely on the `journalctl` host binary and not on the one
shipped within the snap (which the version might differ whether LXD uses
core22 or core24 as a base snap) We can also remove the `--directory ..`
flag as the wrapper script which executes the host journalctl targets by
default the host journal directory.
  • Loading branch information
tomponline authored Jan 17, 2025
2 parents 72e8758 + 0217e14 commit f45d4fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lxd/network/acl/acl_ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,8 @@ func ovnParseLogEntry(logline string, syslogTimestamp string, prefix string) str
func ovnParseLogEntriesFromJournald(ctx context.Context, systemdUnitName string, filter string) ([]string, error) {
var logEntries []string
cmd := []string{
"/usr/bin/journalctl",
"journalctl",
"--unit", systemdUnitName,
"--directory", shared.HostPath("/var/log/journal"),
"--no-pager",
"--boot", "0",
"--case-sensitive",
Expand Down

0 comments on commit f45d4fd

Please sign in to comment.