Maor Lipchuk has posted comments on this change. Change subject: core: fix remove snapshot with memory only ......................................................................
Patch Set 1: (3 comments) http://gerrit.ovirt.org/#/c/37581/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java: Line 138: } Line 139: } Line 140: Line 141: if (removeSnapshotMemory) { Line 142: removeMemory(snapshot, useTaskManagerToRemoveMemory, snapshotHasImages); you can check here if snapshotHasImages is false, if it is false, then call endVmCommand, instead of implementing it in removeMemory method Line 143: } Line 144: Line 145: setSucceeded(true); Line 146: } Line 159: if (useTaskManager) { Line 160: CommandCoordinatorUtil.executeAsyncCommand(VdcActionType.RemoveMemoryVolumes, parameters, cloneContextAndDetachFromParent()); Line 161: } else { Line 162: VdcReturnValueBase ret = runInternalAction(VdcActionType.RemoveMemoryVolumes, parameters); Line 163: if (!ret.getSucceeded()) { in case of a failure it will stay in lock Line 164: log.error("Cannot remove memory volumes for snapshot '{}'", snapshot.getId()); Line 165: } Line 166: else if (!snapshotHasImages) { Line 167: // no async tasks - ending command manually Line 162: VdcReturnValueBase ret = runInternalAction(VdcActionType.RemoveMemoryVolumes, parameters); Line 163: if (!ret.getSucceeded()) { Line 164: log.error("Cannot remove memory volumes for snapshot '{}'", snapshot.getId()); Line 165: } Line 166: else if (!snapshotHasImages) { Please write this in the same line of the bracket Line 167: // no async tasks - ending command manually Line 168: endVmCommand(); Line 169: } Line 170: } -- To view, visit http://gerrit.ovirt.org/37581 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95cef37947fd02fb54d8bb5a2014ccbab27dc434 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches