From f4938c0d90a1d87ec3692772baf078d36fddd071 Mon Sep 17 00:00:00 2001 From: Yushuo Date: Thu, 9 Mar 2023 23:17:43 +0800 Subject: [PATCH] bugfix: set hostname Setting hostname according to the spec. Fixes: #6247 Signed-off-by: Yushuo --- src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs index 129bdd7fa..f996c5747 100644 --- a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs +++ b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs @@ -216,7 +216,7 @@ impl Sandbox for VirtSandbox { let agent_config = self.agent.agent_config().await; let kernel_modules = KernelModule::set_kernel_modules(agent_config.kernel_modules)?; let req = agent::CreateSandboxRequest { - hostname: "".to_string(), + hostname: spec.hostname.clone(), dns, storages: self .resource_manager