From e2f001ad05d970a49de7594d3c30b005245cde8d Mon Sep 17 00:00:00 2001 From: Benjamin Leggett Date: Wed, 20 May 2026 13:15:44 -0400 Subject: [PATCH 1/2] Use journalctl export format --- src/recorders/postinstall/system.rs | 40 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/recorders/postinstall/system.rs b/src/recorders/postinstall/system.rs index bafc4f7..d2ef80a 100644 --- a/src/recorders/postinstall/system.rs +++ b/src/recorders/postinstall/system.rs @@ -98,80 +98,80 @@ impl SystemRecorder { /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-daemon + /// journalctl -u protect-daemon -o export /// ``` pub async fn record_daemon_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-daemon").await + self.common.run_tool("journalctl -u protect-daemon -o export").await } /// Records the `protect-cri` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-cri + /// journalctl -u protect-cri -o export /// ``` pub async fn record_cri_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-cri").await + self.common.run_tool("journalctl -u protect-cri -o export").await } /// Records the `protect-storage` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-storage + /// journalctl -u protect-storage -o export /// ``` pub async fn record_storage_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-storage").await + self.common.run_tool("journalctl -u protect-storage -o export").await } /// Records the `protect-network` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-network + /// journalctl -u protect-network -o export /// ``` pub async fn record_network_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-network").await + self.common.run_tool("journalctl -u protect-network -o export").await } /// Records the `containerd` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u containerd + /// journalctl -u containerd -o export /// ``` pub async fn record_containerd_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u containerd").await + self.common.run_tool("journalctl -u containerd -o export").await } /// Records the `oxenstored` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u oxenstored + /// journalctl -u oxenstored -o export /// ``` pub async fn record_oxenstored_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u oxenstored").await + self.common.run_tool("journalctl -u oxenstored -o export").await } /// Records the `kubelet` journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -u kubelet + /// journalctl -u kubelet -o export /// ``` pub async fn record_kubelet_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u kubelet").await + self.common.run_tool("journalctl -u kubelet -o export").await } /// Records the current boot kernel journalctl log. /// /// Manual equivalent: /// ```sh - /// journalctl -b + /// journalctl -b -o export /// ``` pub async fn record_boot_log(&self) -> CheckResult { - self.common.run_tool("journalctl -b").await + self.common.run_tool("journalctl -b -o export").await } /// Records the Xen hypervisor capability string. @@ -191,11 +191,11 @@ impl SystemRecorder { /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-orchestrator + /// journalctl -u protect-orchestrator -o export /// ``` pub async fn record_orchestrator_logs(&self) -> CheckResult { self.common - .run_tool("journalctl -u protect-orchestrator") + .run_tool("journalctl -u protect-orchestrator -o export") .await } @@ -203,10 +203,10 @@ impl SystemRecorder { /// /// Manual equivalent: /// ```sh - /// journalctl -u protect-preinit + /// journalctl -u protect-preinit -o export /// ``` pub async fn record_preinit_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-preinit").await + self.common.run_tool("journalctl -u protect-preinit -o export").await } /// Records the Edera Protect daemon configuration. From ff68a945b3f83e7cddd9ec839573468e5da807d5 Mon Sep 17 00:00:00 2001 From: Benjamin Leggett Date: Wed, 20 May 2026 13:20:47 -0400 Subject: [PATCH 2/2] fmt + toolchain bump --- rust-toolchain.toml | 2 +- src/recorders/postinstall/system.rs | 32 +++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4228da0..bc69bc5 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.92.0" +channel = "1.95.0" components = ["rustfmt", "rust-std", "clippy"] diff --git a/src/recorders/postinstall/system.rs b/src/recorders/postinstall/system.rs index d2ef80a..1c0d9b1 100644 --- a/src/recorders/postinstall/system.rs +++ b/src/recorders/postinstall/system.rs @@ -101,7 +101,9 @@ impl SystemRecorder { /// journalctl -u protect-daemon -o export /// ``` pub async fn record_daemon_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-daemon -o export").await + self.common + .run_tool("journalctl -u protect-daemon -o export") + .await } /// Records the `protect-cri` journalctl log. @@ -111,7 +113,9 @@ impl SystemRecorder { /// journalctl -u protect-cri -o export /// ``` pub async fn record_cri_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-cri -o export").await + self.common + .run_tool("journalctl -u protect-cri -o export") + .await } /// Records the `protect-storage` journalctl log. @@ -121,7 +125,9 @@ impl SystemRecorder { /// journalctl -u protect-storage -o export /// ``` pub async fn record_storage_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-storage -o export").await + self.common + .run_tool("journalctl -u protect-storage -o export") + .await } /// Records the `protect-network` journalctl log. @@ -131,7 +137,9 @@ impl SystemRecorder { /// journalctl -u protect-network -o export /// ``` pub async fn record_network_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-network -o export").await + self.common + .run_tool("journalctl -u protect-network -o export") + .await } /// Records the `containerd` journalctl log. @@ -141,7 +149,9 @@ impl SystemRecorder { /// journalctl -u containerd -o export /// ``` pub async fn record_containerd_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u containerd -o export").await + self.common + .run_tool("journalctl -u containerd -o export") + .await } /// Records the `oxenstored` journalctl log. @@ -151,7 +161,9 @@ impl SystemRecorder { /// journalctl -u oxenstored -o export /// ``` pub async fn record_oxenstored_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u oxenstored -o export").await + self.common + .run_tool("journalctl -u oxenstored -o export") + .await } /// Records the `kubelet` journalctl log. @@ -161,7 +173,9 @@ impl SystemRecorder { /// journalctl -u kubelet -o export /// ``` pub async fn record_kubelet_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u kubelet -o export").await + self.common + .run_tool("journalctl -u kubelet -o export") + .await } /// Records the current boot kernel journalctl log. @@ -206,7 +220,9 @@ impl SystemRecorder { /// journalctl -u protect-preinit -o export /// ``` pub async fn record_preinit_logs(&self) -> CheckResult { - self.common.run_tool("journalctl -u protect-preinit -o export").await + self.common + .run_tool("journalctl -u protect-preinit -o export") + .await } /// Records the Edera Protect daemon configuration.