From 2d6c0731eb1bd46440871d6d0e817e2a30efd81f Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 29 Jun 2020 20:55:43 -0700 Subject: [PATCH] kata_agent: Pass "VirtPath" with "PCIAddr" of blk devices to agent [ port from runtime commit 50c1dce137bb3d608daa931c01e4941ed5fdb6cc ] In case the "PCIAddr" of block devices is not available (e.g. cloud-hypervisor), we also pass the "VirtPath" to the agent for adding block devices to the container. Signed-off-by: Bo Chen Signed-off-by: Peng Tao --- src/runtime/virtcontainers/kata_agent.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/virtcontainers/kata_agent.go b/src/runtime/virtcontainers/kata_agent.go index 0001fce4b9..92098af250 100644 --- a/src/runtime/virtcontainers/kata_agent.go +++ b/src/runtime/virtcontainers/kata_agent.go @@ -1221,6 +1221,7 @@ func (k *kataAgent) appendBlockDevice(dev ContainerDevice, c *Container) *grpc.D case config.VirtioBlock: kataDevice.Type = kataBlkDevType kataDevice.Id = d.PCIAddr + kataDevice.VmPath = d.VirtPath case config.VirtioSCSI: kataDevice.Type = kataSCSIDevType kataDevice.Id = d.SCSIAddr