From 2d422a845bd51a871df5ce7fe9d9cac4dcf278a6 Mon Sep 17 00:00:00 2001 From: Xie Yongji Date: Thu, 28 Mar 2019 18:16:02 +0800 Subject: [PATCH] agent: pass correct mount type to agent for ephemeral volumes The "ephemeral" is just used to indicate ephemeral volumes in runtime. We should not pass it to agent. Instead, "bind" should be the correct mount type to be passed. Fixes: #1438 Signed-off-by: Xie Yongji --- virtcontainers/kata_agent.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtcontainers/kata_agent.go b/virtcontainers/kata_agent.go index 0e62803218..134a0ecbf1 100644 --- a/virtcontainers/kata_agent.go +++ b/virtcontainers/kata_agent.go @@ -1119,6 +1119,8 @@ func (k *kataAgent) handleEphemeralStorage(mounts []specs.Mount) []*grpc.Storage if mnt.Type == kataEphemeralDevType { // Set the mount source path to a path that resides inside the VM 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 // tmpfs backed volume inside the VM