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

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.

Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
(cherry picked from commit 0217e14)
  • Loading branch information
gabrielmougard authored and tomponline committed Jan 20, 2025
1 parent 7dd0957 commit c13ce57
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 c13ce57

Please sign in to comment.