Skip to content

Commit 0483923

Browse files
committed
Update reboot-required file with staged image context
This change updates the /run/reboot-required file to include information about the staged bootc image digest. This will provide users with information about what bootc image will be effective after the system has been rebooted. Fixes #1574 Signed-off-by: Brendan Shephard <[email protected]>
1 parent 310f9f5 commit 0483923

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/lib/src/deploy.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,13 @@ pub(crate) async fn stage(
794794

795795
// Unconditionally create or update /run/reboot-required to signal a reboot is needed.
796796
// This is monitored by kured (Kubernetes Reboot Daemon).
797+
let reboot_message = format!(
798+
"Reboot required for bootc image digest: {}",
799+
image.manifest_digest.as_ref()
800+
);
797801
let run_dir = Dir::open_ambient_dir("/run", cap_std::ambient_authority())?;
798802
run_dir
799-
.atomic_write("reboot-required", b"")
803+
.atomic_write("reboot-required", reboot_message.as_bytes())
800804
.context("Creating /run/reboot-required")?;
801805

802806
Ok(())

0 commit comments

Comments
 (0)