Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure /mnt mountpoint exists for firecracker #34

Merged
merged 1 commit into from
Jan 19, 2024
Merged
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
8 changes: 8 additions & 0 deletions flake-ctl/src/firecracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ pub async fn pull_component_image(
let dev_pts_in_image = format!(
"{}/{}", tmp_dir_path, "/dev/pts"
);
// required for overlay root allocation
let mnt_in_image = format!(
"{}/{}", tmp_dir_path, "/mnt"
);
if ! Path::new(&sci_in_image).exists() {
info!("Copying sci to rootfs...");
if ! copy(
Expand Down Expand Up @@ -219,6 +223,10 @@ pub async fn pull_component_image(
umount(&tmp_dir_path, "root");
return result
}
if ! Path::new(&mnt_in_image).exists() && ! mkdir(&mnt_in_image, "root") {
umount(&tmp_dir_path, "root");
return result
}
umount(&tmp_dir_path, "root");
}

Expand Down
Loading