device: fix the issue of passing wrong device address using virtio-blk

Kata agent expects the pci address to be passed and not the
virtPath in guest.

Fixes: #831

Signed-off-by: fupan <lifupan@gmail.com>
This commit is contained in:
fupan 2018-10-17 20:08:06 +08:00
parent d00742f43f
commit b72a3cdcce

View File

@ -1073,7 +1073,7 @@ func (k *kataAgent) handleBlockVolumes(c *Container) []*grpc.Storage {
} }
if c.sandbox.config.HypervisorConfig.BlockDeviceDriver == VirtioBlock { if c.sandbox.config.HypervisorConfig.BlockDeviceDriver == VirtioBlock {
vol.Driver = kataBlkDevType vol.Driver = kataBlkDevType
vol.Source = blockDrive.VirtPath vol.Source = blockDrive.PCIAddr
} else { } else {
vol.Driver = kataSCSIDevType vol.Driver = kataSCSIDevType
vol.Source = blockDrive.SCSIAddr vol.Source = blockDrive.SCSIAddr