mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-13 21:09:31 +00:00
Merge pull request #1560 from egernst/fix-1559
container: on cleanup, rm container directory for mounts path
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user