Merge pull request #1439 from YongjiXie/pass-correct-mount-type-for-ephemeral-volumes

agent: pass correct mount type to agent for ephemeral volumes
This commit is contained in:
Peng Tao
2019-04-16 15:36:14 +08:00
committed by GitHub

View File

@@ -1130,6 +1130,8 @@ func (k *kataAgent) handleEphemeralStorage(mounts []specs.Mount) []*grpc.Storage
if mnt.Type == KataEphemeralDevType { if mnt.Type == KataEphemeralDevType {
// Set the mount source path to a path that resides inside the VM // Set the mount source path to a path that resides inside the VM
mounts[idx].Source = filepath.Join(ephemeralPath, filepath.Base(mnt.Source)) mounts[idx].Source = filepath.Join(ephemeralPath, filepath.Base(mnt.Source))
// Set the mount type to "bind"
mounts[idx].Type = "bind"
// Create a storage struct so that kata agent is able to create // Create a storage struct so that kata agent is able to create
// tmpfs backed volume inside the VM // tmpfs backed volume inside the VM