From 95e804724495b1b45ef251cbab1c777e7ec349fd Mon Sep 17 00:00:00 2001 From: Jiaxiao Zhou Date: Wed, 23 Aug 2023 09:47:07 -0700 Subject: [PATCH] update to the newest main branch from runwasi (#131) --- containerd-shim-lunatic-v1/Cargo.lock | 21 +-------- containerd-shim-lunatic-v1/Cargo.toml | 2 +- containerd-shim-lunatic-v1/src/main.rs | 40 +++++------------ containerd-shim-slight-v1/Cargo.lock | 21 +-------- containerd-shim-slight-v1/Cargo.toml | 2 +- containerd-shim-slight-v1/src/main.rs | 47 ++++--------------- containerd-shim-spin-v1/Cargo.lock | 21 +-------- containerd-shim-spin-v1/Cargo.toml | 2 +- containerd-shim-spin-v1/src/main.rs | 62 +++++++------------------- containerd-shim-wws-v1/Cargo.lock | 21 +-------- containerd-shim-wws-v1/Cargo.toml | 2 +- containerd-shim-wws-v1/src/main.rs | 46 ++++--------------- 12 files changed, 51 insertions(+), 236 deletions(-) diff --git a/containerd-shim-lunatic-v1/Cargo.lock b/containerd-shim-lunatic-v1/Cargo.lock index cd243f9b..70a23454 100644 --- a/containerd-shim-lunatic-v1/Cargo.lock +++ b/containerd-shim-lunatic-v1/Cargo.lock @@ -686,7 +686,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27#6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27" +source = "git+https://github.com/containerd/runwasi?rev=7850da82a86286f6fcf21e1c93390572ed73592d#7850da82a86286f6fcf21e1c93390572ed73592d" dependencies = [ "anyhow", "caps", @@ -700,7 +700,6 @@ dependencies = [ "log", "nix 0.26.2", "oci-spec", - "proc-mounts", "protobuf 3.2.0", "serde", "serde_json", @@ -2620,15 +2619,6 @@ dependencies = [ "windows-targets 0.48.3", ] -[[package]] -name = "partition-identity" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa925f9becb532d758b0014b472c576869910929cf4c3f8054b386f19ab9e21" -dependencies = [ - "thiserror", -] - [[package]] name = "password-hash" version = "0.4.2" @@ -2791,15 +2781,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-mounts" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d652f8435d0ab70bf4f3590a6a851d59604831a458086541b95238cc51ffcf2" -dependencies = [ - "partition-identity", -] - [[package]] name = "procfs" version = "0.15.1" diff --git a/containerd-shim-lunatic-v1/Cargo.toml b/containerd-shim-lunatic-v1/Cargo.toml index 55402315..ee7bb3d3 100644 --- a/containerd-shim-lunatic-v1/Cargo.toml +++ b/containerd-shim-lunatic-v1/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] containerd-shim = "0.4.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27", features = ["cgroupsv2"] } +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7850da82a86286f6fcf21e1c93390572ed73592d", features = ["cgroupsv2"] } libcontainer = { version = "0.1", features = ["v2"], default-features = false } nix = "0.26.2" serde = "1.0.183" diff --git a/containerd-shim-lunatic-v1/src/main.rs b/containerd-shim-lunatic-v1/src/main.rs index 17926f79..0e66bf8e 100644 --- a/containerd-shim-lunatic-v1/src/main.rs +++ b/containerd-shim-lunatic-v1/src/main.rs @@ -1,8 +1,6 @@ use std::{ - fs::File, - io::{ErrorKind, Read}, os::fd::IntoRawFd, - path::{Path, PathBuf}, + path::PathBuf, sync::{Arc, Condvar, Mutex}, }; @@ -10,14 +8,15 @@ use containerd_shim::run; use containerd_shim_wasm::{ libcontainer_instance::LibcontainerInstance, sandbox::{ - instance::ExitCode, instance_utils::maybe_open_stdio, Error, InstanceConfig, ShimCli, + instance::ExitCode, + instance_utils::{determine_rootdir, maybe_open_stdio}, + Error, InstanceConfig, ShimCli, }, }; use libcontainer::{ container::{builder::ContainerBuilder, Container}, syscall::syscall::create_syscall, }; -use serde::{Deserialize, Serialize}; use anyhow::{Context, Result}; @@ -38,30 +37,6 @@ pub struct Wasi { stderr: String, } -#[derive(Serialize, Deserialize)] -struct Options { - root: Option, -} - -fn determine_rootdir>(bundle: P, namespace: String) -> Result { - let mut file = match File::open(bundle.as_ref().join("options.json")) { - Ok(f) => f, - Err(err) => match err.kind() { - ErrorKind::NotFound => { - return Ok(<&str as Into>::into(DEFAULT_CONTAINER_ROOT_DIR).join(namespace)) - } - _ => return Err(err.into()), - }, - }; - let mut data = String::new(); - file.read_to_string(&mut data)?; - let options: Options = serde_json::from_str(&data)?; - Ok(options - .root - .unwrap_or(PathBuf::from(DEFAULT_CONTAINER_ROOT_DIR)) - .join(namespace)) -} - impl LibcontainerInstance for Wasi { type Engine = (); @@ -72,7 +47,12 @@ impl LibcontainerInstance for Wasi { Wasi { id, exit_code: Arc::new((Mutex::new(None), Condvar::new())), - rootdir: determine_rootdir(bundle.as_str(), cfg.get_namespace()).unwrap(), + rootdir: determine_rootdir( + bundle.as_str(), + cfg.get_namespace().as_str(), + DEFAULT_CONTAINER_ROOT_DIR, + ) + .unwrap(), bundle, stdin: cfg.get_stdin().unwrap_or_default(), stdout: cfg.get_stdout().unwrap_or_default(), diff --git a/containerd-shim-slight-v1/Cargo.lock b/containerd-shim-slight-v1/Cargo.lock index cdb39873..26468cd4 100644 --- a/containerd-shim-slight-v1/Cargo.lock +++ b/containerd-shim-slight-v1/Cargo.lock @@ -1474,7 +1474,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27#6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27" +source = "git+https://github.com/containerd/runwasi?rev=7850da82a86286f6fcf21e1c93390572ed73592d#7850da82a86286f6fcf21e1c93390572ed73592d" dependencies = [ "anyhow", "caps", @@ -1488,7 +1488,6 @@ dependencies = [ "log", "nix 0.26.2", "oci-spec", - "proc-mounts", "protobuf 3.2.0", "serde", "serde_json", @@ -3599,15 +3598,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "partition-identity" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa925f9becb532d758b0014b472c576869910929cf4c3f8054b386f19ab9e21" -dependencies = [ - "thiserror", -] - [[package]] name = "paste" version = "1.0.12" @@ -3864,15 +3854,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-mounts" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d652f8435d0ab70bf4f3590a6a851d59604831a458086541b95238cc51ffcf2" -dependencies = [ - "partition-identity", -] - [[package]] name = "procfs" version = "0.15.1" diff --git a/containerd-shim-slight-v1/Cargo.toml b/containerd-shim-slight-v1/Cargo.toml index 4041d8bb..fd85983a 100644 --- a/containerd-shim-slight-v1/Cargo.toml +++ b/containerd-shim-slight-v1/Cargo.toml @@ -14,7 +14,7 @@ Containerd shim for running Slight workloads. chrono = "0.4" clap = { version = "4.1", features = ["derive", "env"] } containerd-shim = "0.4.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7850da82a86286f6fcf21e1c93390572ed73592d", features = ["cgroupsv2"]} log = "0.4" tokio = { version = "1", features = [ "full" ] } tokio-util = { version = "0.7", features = [ "codec" ]} diff --git a/containerd-shim-slight-v1/src/main.rs b/containerd-shim-slight-v1/src/main.rs index b45fb791..acfce947 100644 --- a/containerd-shim-slight-v1/src/main.rs +++ b/containerd-shim-slight-v1/src/main.rs @@ -1,23 +1,17 @@ -use std::fs::File; -use std::io::ErrorKind; -use std::io::Read; use std::option::Option; -use std::path::Path; use std::path::PathBuf; -use anyhow::{Context, Result}; +use anyhow::Context; use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::maybe_open_stdio; +use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::SlightExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; use libcontainer::syscall::syscall::create_syscall; -use serde::Deserialize; -use serde::Serialize; use std::os::fd::IntoRawFd; mod executor; @@ -34,43 +28,18 @@ pub struct Wasi { rootdir: PathBuf, } -#[derive(Serialize, Deserialize)] -struct Options { - root: Option, -} - -fn determine_rootdir>(bundle: P, namespace: String) -> Result { - log::info!( - "determining rootdir for bundle: {}", - bundle.as_ref().display() - ); - let mut file = match File::open(bundle.as_ref().join("options.json")) { - Ok(f) => f, - Err(err) => match err.kind() { - ErrorKind::NotFound => { - return Ok(<&str as Into>::into(DEFAULT_CONTAINER_ROOT_DIR).join(namespace)) - } - _ => return Err(err.into()), - }, - }; - let mut data = String::new(); - file.read_to_string(&mut data)?; - let options: Options = serde_json::from_str(&data)?; - let path = options - .root - .unwrap_or(PathBuf::from(DEFAULT_CONTAINER_ROOT_DIR)) - .join(namespace); - log::info!("youki root path is: {}", path.display()); - Ok(path) -} - impl LibcontainerInstance for Wasi { type Engine = (); fn new_libcontainer(id: String, cfg: Option<&InstanceConfig>) -> Self { log::info!(">>> new instance"); let cfg = cfg.unwrap(); let bundle = cfg.get_bundle().unwrap_or_default(); - let rootdir = determine_rootdir(bundle.as_str(), cfg.get_namespace()).unwrap(); + let rootdir = determine_rootdir( + bundle.as_str(), + cfg.get_namespace().as_str(), + DEFAULT_CONTAINER_ROOT_DIR, + ) + .unwrap(); Wasi { exit_code: Default::default(), id, diff --git a/containerd-shim-spin-v1/Cargo.lock b/containerd-shim-spin-v1/Cargo.lock index a46e6b88..c0ffacd7 100644 --- a/containerd-shim-spin-v1/Cargo.lock +++ b/containerd-shim-spin-v1/Cargo.lock @@ -825,7 +825,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27#6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27" +source = "git+https://github.com/containerd/runwasi?rev=7850da82a86286f6fcf21e1c93390572ed73592d#7850da82a86286f6fcf21e1c93390572ed73592d" dependencies = [ "anyhow", "caps", @@ -839,7 +839,6 @@ dependencies = [ "log", "nix 0.26.2", "oci-spec", - "proc-mounts", "protobuf 3.2.0", "serde", "serde_json", @@ -3006,15 +3005,6 @@ dependencies = [ "windows-targets 0.48.1", ] -[[package]] -name = "partition-identity" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa925f9becb532d758b0014b472c576869910929cf4c3f8054b386f19ab9e21" -dependencies = [ - "thiserror", -] - [[package]] name = "paste" version = "1.0.14" @@ -3238,15 +3228,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-mounts" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d652f8435d0ab70bf4f3590a6a851d59604831a458086541b95238cc51ffcf2" -dependencies = [ - "partition-identity", -] - [[package]] name = "procfs" version = "0.15.1" diff --git a/containerd-shim-spin-v1/Cargo.toml b/containerd-shim-spin-v1/Cargo.toml index 8ad2b157..9eb0f6ca 100644 --- a/containerd-shim-spin-v1/Cargo.toml +++ b/containerd-shim-spin-v1/Cargo.toml @@ -14,7 +14,7 @@ Containerd shim for running Spin workloads. chrono = "0.4" clap = { version = "4.3", features = ["derive", "env"] } containerd-shim = "0.4.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7850da82a86286f6fcf21e1c93390572ed73592d", features = ["cgroupsv2"]} log = "0.4" spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v1.4.0" } spin-app = { git = "https://github.com/fermyon/spin", tag = "v1.4.0" } diff --git a/containerd-shim-spin-v1/src/main.rs b/containerd-shim-spin-v1/src/main.rs index bbffbde3..1ad8f7c9 100644 --- a/containerd-shim-spin-v1/src/main.rs +++ b/containerd-shim-spin-v1/src/main.rs @@ -1,10 +1,6 @@ -use std::fs::File; -use std::io::ErrorKind; -use std::io::Read; use std::net::SocketAddr; use std::net::ToSocketAddrs; use std::option::Option; -use std::path::Path; use std::path::PathBuf; use std::sync::{Arc, Condvar, Mutex}; @@ -14,16 +10,12 @@ use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::maybe_open_stdio; -use containerd_shim_wasm::sandbox::{ - error::Error, InstanceConfig, ShimCli, -}; +use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; +use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::SpinExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; use libcontainer::syscall::syscall::create_syscall; -use serde::Deserialize; -use serde::Serialize; use std::os::fd::IntoRawFd; mod executor; @@ -41,43 +33,18 @@ pub struct Wasi { rootdir: PathBuf, } -#[derive(Serialize, Deserialize)] -struct Options { - root: Option, -} - -fn determine_rootdir>(bundle: P, namespace: String) -> Result { - log::info!( - "determining rootdir for bundle: {}", - bundle.as_ref().display() - ); - let mut file = match File::open(bundle.as_ref().join("options.json")) { - Ok(f) => f, - Err(err) => match err.kind() { - ErrorKind::NotFound => { - return Ok(<&str as Into>::into(DEFAULT_CONTAINER_ROOT_DIR).join(namespace)) - } - _ => return Err(err.into()), - }, - }; - let mut data = String::new(); - file.read_to_string(&mut data)?; - let options: Options = serde_json::from_str(&data)?; - let path = options - .root - .unwrap_or(PathBuf::from(DEFAULT_CONTAINER_ROOT_DIR)) - .join(namespace); - log::info!("youki root path is: {}", path.display()); - Ok(path) -} - impl LibcontainerInstance for Wasi { type Engine = (); fn new_libcontainer(id: String, cfg: Option<&InstanceConfig>) -> Self { let cfg = cfg.unwrap(); let bundle = cfg.get_bundle().unwrap_or_default(); - let rootdir = determine_rootdir(bundle.as_str(), cfg.get_namespace()).unwrap(); + let rootdir = determine_rootdir( + bundle.as_str(), + cfg.get_namespace().as_str(), + DEFAULT_CONTAINER_ROOT_DIR, + ) + .unwrap(); Wasi { exit_code: Arc::new((Mutex::new(None), Condvar::new())), id, @@ -103,9 +70,15 @@ impl LibcontainerInstance for Wasi { fn build_container(&self) -> std::result::Result { let syscall = create_syscall(); - let stdin = maybe_open_stdio(&self.stdin).context("could not open stdin")?.map(|f| f.into_raw_fd()); - let stdout = maybe_open_stdio(&self.stdout).context("could not open stdout")?.map(|f| f.into_raw_fd()); - let stderr = maybe_open_stdio(&self.stderr).context("could not open stderr")?.map(|f| f.into_raw_fd()); + let stdin = maybe_open_stdio(&self.stdin) + .context("could not open stdin")? + .map(|f| f.into_raw_fd()); + let stdout = maybe_open_stdio(&self.stdout) + .context("could not open stdout")? + .map(|f| f.into_raw_fd()); + let stderr = maybe_open_stdio(&self.stderr) + .context("could not open stderr")? + .map(|f| f.into_raw_fd()); let err_others = |err| Error::Others(format!("failed to create container: {}", err)); let spin_executor = Box::new(SpinExecutor { stdin, @@ -126,7 +99,6 @@ impl LibcontainerInstance for Wasi { .map_err(err_others)?; Ok(container) } - } fn parse_addr(addr: &str) -> Result { diff --git a/containerd-shim-wws-v1/Cargo.lock b/containerd-shim-wws-v1/Cargo.lock index 305f76c7..40d7f91d 100644 --- a/containerd-shim-wws-v1/Cargo.lock +++ b/containerd-shim-wws-v1/Cargo.lock @@ -691,7 +691,7 @@ dependencies = [ [[package]] name = "containerd-shim-wasm" version = "0.2.1" -source = "git+https://github.com/containerd/runwasi?rev=6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27#6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27" +source = "git+https://github.com/containerd/runwasi?rev=7850da82a86286f6fcf21e1c93390572ed73592d#7850da82a86286f6fcf21e1c93390572ed73592d" dependencies = [ "anyhow", "caps", @@ -705,7 +705,6 @@ dependencies = [ "log", "nix 0.26.2", "oci-spec", - "proc-mounts", "protobuf 3.2.0", "serde", "serde_json", @@ -2304,15 +2303,6 @@ dependencies = [ "windows-targets 0.48.1", ] -[[package]] -name = "partition-identity" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa925f9becb532d758b0014b472c576869910929cf4c3f8054b386f19ab9e21" -dependencies = [ - "thiserror", -] - [[package]] name = "paste" version = "1.0.13" @@ -2411,15 +2401,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "proc-mounts" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d652f8435d0ab70bf4f3590a6a851d59604831a458086541b95238cc51ffcf2" -dependencies = [ - "partition-identity", -] - [[package]] name = "procfs" version = "0.15.1" diff --git a/containerd-shim-wws-v1/Cargo.toml b/containerd-shim-wws-v1/Cargo.toml index ff4be00f..85652bbe 100644 --- a/containerd-shim-wws-v1/Cargo.toml +++ b/containerd-shim-wws-v1/Cargo.toml @@ -14,7 +14,7 @@ Containerd shim for running Wasm Workers Server workloads. [dependencies] containerd-shim = "0.4.0" -containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "6287dff637b0ac96a43a6bbe2c7919f8b2f2cf27", features = ["cgroupsv2"]} +containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "7850da82a86286f6fcf21e1c93390572ed73592d", features = ["cgroupsv2"]} wws-config = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } wws-server = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } wws-router = { git = "https://github.com/vmware-labs/wasm-workers-server", tag = "v1.4.0" } diff --git a/containerd-shim-wws-v1/src/main.rs b/containerd-shim-wws-v1/src/main.rs index 9c372709..890a5b49 100644 --- a/containerd-shim-wws-v1/src/main.rs +++ b/containerd-shim-wws-v1/src/main.rs @@ -1,22 +1,16 @@ -use anyhow::{Context, Result}; +use anyhow::Context; use containerd_shim as shim; use containerd_shim_wasm::libcontainer_instance::LibcontainerInstance; use containerd_shim_wasm::libcontainer_instance::LinuxContainerExecutor; use containerd_shim_wasm::sandbox::instance::ExitCode; -use containerd_shim_wasm::sandbox::instance_utils::maybe_open_stdio; +use containerd_shim_wasm::sandbox::instance_utils::{determine_rootdir, maybe_open_stdio}; use containerd_shim_wasm::sandbox::{error::Error, InstanceConfig, ShimCli}; use executor::WwsExecutor; use libcontainer::container::builder::ContainerBuilder; use libcontainer::container::Container; use libcontainer::syscall::syscall::create_syscall; -use serde::Deserialize; -use serde::Serialize; -use std::fs::File; -use std::io::ErrorKind; -use std::io::Read; use std::option::Option; use std::os::fd::IntoRawFd; -use std::path::Path; use std::path::PathBuf; mod executor; @@ -35,35 +29,6 @@ pub struct Workers { bundle: String, rootdir: PathBuf, } -#[derive(Serialize, Deserialize)] -struct Options { - root: Option, -} - -fn determine_rootdir>(bundle: P, namespace: String) -> Result { - log::info!( - "determining rootdir for bundle: {}", - bundle.as_ref().display() - ); - let mut file = match File::open(bundle.as_ref().join("options.json")) { - Ok(f) => f, - Err(err) => match err.kind() { - ErrorKind::NotFound => { - return Ok(<&str as Into>::into(DEFAULT_CONTAINER_ROOT_DIR).join(namespace)) - } - _ => return Err(err.into()), - }, - }; - let mut data = String::new(); - file.read_to_string(&mut data)?; - let options: Options = serde_json::from_str(&data)?; - let path = options - .root - .unwrap_or(PathBuf::from(DEFAULT_CONTAINER_ROOT_DIR)) - .join(namespace); - log::info!("youki root path is: {}", path.display()); - Ok(path) -} /// Implement the "default" interface from runwasi impl LibcontainerInstance for Workers { @@ -72,7 +37,12 @@ impl LibcontainerInstance for Workers { log::info!("[wws] new instance"); let cfg = cfg.unwrap(); let bundle = cfg.get_bundle().unwrap_or_default(); - let rootdir = determine_rootdir(bundle.as_str(), cfg.get_namespace()).unwrap(); + let rootdir = determine_rootdir( + bundle.as_str(), + cfg.get_namespace().as_str(), + DEFAULT_CONTAINER_ROOT_DIR, + ) + .unwrap(); Workers { exit_code: Default::default(), id,