Merge pull request #1560 from egernst/fix-1559

container: on cleanup, rm container directory for mounts path
This commit is contained in:
Eric Ernst
2021-03-29 14:14:52 -07:00
committed by GitHub

View File

@@ -1047,7 +1047,7 @@ func (c *Container) stop(ctx context.Context, force bool) error {
return err 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 { if err := syscall.Rmdir(shareDir); err != nil {
c.Logger().WithError(err).WithField("share-dir", shareDir).Warn("Could not remove container share dir") c.Logger().WithError(err).WithField("share-dir", shareDir).Warn("Could not remove container share dir")
} }