mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-29 19:24:23 +01:00
Merge pull request #1247 from nitkon/leakyPods
qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
This commit is contained in:
@@ -646,6 +646,7 @@ func (q *qemu) stopSandbox() error {
|
||||
span, _ := q.trace("stopSandbox")
|
||||
defer span.Finish()
|
||||
|
||||
defer q.cleanupVM()
|
||||
q.Logger().Info("Stopping Sandbox")
|
||||
|
||||
err := q.qmpSetup()
|
||||
@@ -659,6 +660,11 @@ func (q *qemu) stopSandbox() error {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (q *qemu) cleanupVM() error {
|
||||
|
||||
// cleanup vm path
|
||||
dir := filepath.Join(store.RunVMStoragePath, q.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user