Idan Shaby has uploaded a new change for review. Change subject: core: Remove Memory and OVF Volumes on VM Remove ......................................................................
core: Remove Memory and OVF Volumes on VM Remove When removing a VM that has a snapshot with memory, its memory and OVF volumes are not removed. The reason for this is the value of the property removeOnlyIfNotUsedAtAll in RemoveMemoryVolumesParameters. If we don't set its value to true, by default it's false and then we can remove the memory and OVF volumes before the VM's disks. Change-Id: I5303c571e3d8843c03b195ec91763279053bc5de Bug-Url: https://bugzilla.redhat.com/1145073 Bug-Url: https://bugzilla.redhat.com/1145188 Bug-Url: https://bugzilla.redhat.com/1147085 Bug-Url: https://bugzilla.redhat.com/1145254 Signed-off-by: Idan Shaby <ish...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java 1 file changed, 1 insertion(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/64/33464/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java index 1e5e343..5d225d7 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java @@ -133,21 +133,13 @@ for (String memoryState : memoryStates) { VdcReturnValueBase retVal = getBackend().runInternalAction( VdcActionType.RemoveMemoryVolumes, - buildRemoveMemoryVolumesParameters(memoryState, getVmId())); + new RemoveMemoryVolumesParameters(memoryState, getVmId())); if (!retVal.getSucceeded()) { log.errorFormat("Failed to remove memory volumes whie removing vm {0} (volumes: {1})", getVmId(), memoryState); } } - } - - private RemoveMemoryVolumesParameters buildRemoveMemoryVolumesParameters(String memoryState, Guid vmId) { - RemoveMemoryVolumesParameters parameters = - new RemoveMemoryVolumesParameters(memoryState, getVmId()); - parameters.setRemoveOnlyIfNotUsedAtAll(true); - - return parameters; } @Override -- To view, visit http://gerrit.ovirt.org/33464 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5303c571e3d8843c03b195ec91763279053bc5de Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Idan Shaby <ish...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches