Do not perform local cleanup of vmi until vmi is in a finalized state
@@ -1232,9 +1232,11 @@ func (d *VirtualMachineController) defaultExecute(key string,
log.Log.Object(vmi).V(3).Info("Deleting domain for VirtualMachineInstance with deletion timestamp.")
shouldDelete = true
default:
+ if vmi.IsFinal() {
shouldCleanUp = true
}
}
+ }
// Determine if domain needs to be deleted as a result of VirtualMachineInstance
// shutting down naturally (guest internal invoked shutdown)
