Skip to content

Commit

Permalink
Merge pull request kata-containers#10696 from teawater/kt
Browse files Browse the repository at this point in the history
kata-ctl: direct-volume: Auto create KATA_DIRECT_VOLUME_ROOT_PATH
  • Loading branch information
justxuewei authored Jan 2, 2025
2 parents 6400295 + d15a7ba commit 71b14d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/kata-ctl/src/ops/volume_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ async fn stats(volume_path: &str) -> Result<Option<String>> {

// add writes the mount info (json string) of a direct volume into a filesystem path known to Kata Containers.
pub fn add(volume_path: &str, mount_info: &str) -> Result<Option<String>> {
fs::create_dir_all(KATA_DIRECT_VOLUME_ROOT_PATH)?;
let mount_info_dir_path = join_path(KATA_DIRECT_VOLUME_ROOT_PATH, volume_path)?;

// create directory if missing
Expand Down

0 comments on commit 71b14d4

Please sign in to comment.