-
Notifications
You must be signed in to change notification settings - Fork 376
empty-dir: Fix bug in the way empty-dirs are handled for overlay #1826
Conversation
cc @awprice |
@@ -1285,7 +1285,7 @@ func (k *kataAgent) handleEphemeralStorage(mounts []specs.Mount) []*grpc.Storage | |||
|
|||
// handleLocalStorage handles local storage within the VM | |||
// by creating a directory in the VM from the source of the mount point. | |||
func (k *kataAgent) handleLocalStorage(mounts []specs.Mount, sandboxID string) []*grpc.Storage { | |||
func (k *kataAgent) handleLocalStorage(mounts []specs.Mount, sandboxID string, rootfsSuffix string) []*grpc.Storage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function doesn't have any unit tests so I think, given the subtle nature of this bug, we need one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though agree wrt unit test.
With kata-containers#1485, we moved the default medium empty-dir creation to the sandbox rootfs. This worked for devicemapper, but in case of overlay the "local" directory was being created outside the sandbox rootfs. As a result we were seeing the behaviour seen in kata-containers#1818. Fixes kata-containers#1818 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
15ce800
to
57136fa
Compare
@jodh-intel @egernst Test added! |
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @amshinde.
Ping @kata-containers/runtime ! |
Looks this PR make the behavior of overlay identical to DeviceMapper, which is good to me. While having chatted with @bergwolf, he has some other suggestions. |
@bergwolf let's pull in further changes in new PR? |
With #1485, we moved the default medium empty-dir creation to the
sandbox rootfs. This worked for devicemapper, but in case of overlay
the "local" directory was being created outside the sandbox rootfs.
As a result we were seeing the behaviour seen in #1818.
Fixes #1818
Signed-off-by: Archana Shinde archana.m.shinde@intel.com