mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 16:27:50 +00:00
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:
commit
fc676f76de
@ -1044,7 +1044,7 @@ func (c *Container) stop(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")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user