From c13ce57aa9ef16693caae30f6c8e878ab5a4c96e Mon Sep 17 00:00:00 2001 From: Gabriel Mougard Date: Thu, 16 Jan 2025 11:02:11 +0100 Subject: [PATCH] lxd/network/acl: Use the `journalctl` wrapper script introduced in the 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 (cherry picked from commit 0217e14ec27eff6432723a1dd40cc2416255add6) --- lxd/network/acl/acl_ovn.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lxd/network/acl/acl_ovn.go b/lxd/network/acl/acl_ovn.go index 6ea291775019..e34dc81eae73 100644 --- a/lxd/network/acl/acl_ovn.go +++ b/lxd/network/acl/acl_ovn.go @@ -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",