Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1247 from nitkon/leakyPods
Browse files Browse the repository at this point in the history
qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
  • Loading branch information
bergwolf authored Feb 21, 2019
2 parents 60f7c4f + 6daefdb commit 1d79338
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)

Expand Down

0 comments on commit 1d79338

Please sign in to comment.