Merge pull request #1567 from egernst/cleanup-pr-stable-2.0

container: on cleanup, rm container directory for mounts path
This commit is contained in:
Peng Tao
2021-03-30 11:12:25 +08:00
committed by GitHub

View File

@@ -1044,7 +1044,7 @@ func (c *Container) stop(force bool) error {
return err
}
shareDir := filepath.Join(kataHostSharedDir(), c.sandbox.id, c.id)
shareDir := filepath.Join(getMountPath(c.sandbox.id), c.id)
if err := syscall.Rmdir(shareDir); err != nil {
c.Logger().WithError(err).WithField("share-dir", shareDir).Warn("Could not remove container share dir")
}