From 9e0c926a1d7d256556a90ce60a195fe4db67aafa Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 30 Oct 2026 13:10:20 +0000 Subject: [PATCH] hack: read host journal in gather-logs.sh The daemon image does not ship journalctl, so the per-node journal artifact only contained "executable file `journalctl` not found". Enter the host mount namespace via nsenter, as getBootCount already does, so the full host journal across all boots is collected. Also save `journalctl --list-boots` to map boot ids to timestamps. Assisted-by: AI Signed-off-by: Alice Frosi (cherry picked from commit fb632dbc79c23b1439bd57be3cb9a0e370135057) --- hack/gather-logs.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hack/gather-logs.sh b/hack/gather-logs.sh index a580b12a..474d1318 100755 --- a/hack/gather-logs.sh +++ b/hack/gather-logs.sh @@ -55,8 +55,12 @@ for node in "${nodes[@]}"; do -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true) if [[ -n "${daemon_pod}" ]]; then - run "journal-${node}.txt" kubectl exec -n bootc-operator "${daemon_pod}" -- \ - journalctl --no-pager + # The daemon image has no journalctl; enter the host mount namespace + # to read the host journal (all boots). + host_exec=(kubectl exec -n bootc-operator "${daemon_pod}" -- \ + nsenter -m/proc/1/ns/mnt --) + run "journal-${node}.txt" "${host_exec[@]}" journalctl --no-pager + run "journal-list-boots-${node}.txt" "${host_exec[@]}" journalctl --no-pager --list-boots fi done