Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.92.0"
channel = "1.95.0"
components = ["rustfmt", "rust-std", "clippy"]
56 changes: 36 additions & 20 deletions src/recorders/postinstall/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,80 +102,94 @@ 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.
Expand All @@ -195,22 +209,24 @@ 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
}

/// Records the `protect-preinit` journalctl log.
///
/// 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.
Expand Down