From ae6c4712b8f9e89fd7f026a846fce1af2fa83630 Mon Sep 17 00:00:00 2001 From: Yuhang Wei Date: Wed, 18 Dec 2024 16:04:07 +0800 Subject: [PATCH] fix(agent): flush stdout before rebooting to ensure log visibility Signed-off-by: Yuhang Wei --- KubeOS-Rust/agent/src/rpc/agent_impl.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/KubeOS-Rust/agent/src/rpc/agent_impl.rs b/KubeOS-Rust/agent/src/rpc/agent_impl.rs index f335dab0..1241d492 100644 --- a/KubeOS-Rust/agent/src/rpc/agent_impl.rs +++ b/KubeOS-Rust/agent/src/rpc/agent_impl.rs @@ -154,6 +154,7 @@ impl AgentImpl { fn reboot(&self) -> Result<()> { info!("Wait to reboot"); + std::io::stdout().flush(); thread::sleep(Duration::from_secs(1)); sync(); if self.disable_reboot { -- Gitee