runtime-rs: make Container::new async

Fixes: #6714

Signed-off-by: Zixuan Tan <tanzixuan.me@gmail.com>
This commit is contained in:
Zixuan Tan
2023-07-28 00:26:52 +08:00
parent 5449173102
commit 973b5ad1f4
2 changed files with 2 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ pub struct Container {
}
impl Container {
pub fn new(
pub async fn new(
pid: u32,
config: ContainerConfig,
spec: oci::Spec,

View File

@@ -78,6 +78,7 @@ impl ContainerManager for VirtContainerManager {
self.agent.clone(),
self.resource_manager.clone(),
)
.await
.context("new container")?;
// CreateContainer Hooks: