bugfix: set hostname

Setting hostname according to the spec.

Fixes: #6247

Signed-off-by: Yushuo <y-shuo@linux.alibaba.com>
This commit is contained in:
Yushuo 2023-03-09 23:17:43 +08:00
parent e6e719699f
commit f4938c0d90

View File

@ -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