Merge pull request #1247 from nitkon/leakyPods

qemu: Cleanup Vm paths irrespective of Sandbox stop pass/fail
This commit is contained in:
Peng Tao
2019-02-21 11:56:57 +08:00
committed by GitHub

View File

@@ -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)