Liron Aravot has uploaded a new change for review. Change subject: core: MoveOrCopyImageGroup - fixes to revertTasks ......................................................................
core: MoveOrCopyImageGroup - fixes to revertTasks currently the revertTasks method in MoveOrCopyImageGroupCommand issues a RemoveImage command in order to attempt to revert to operation. The issued RemoveImage command parameters are set with MoveOrCopyImageGroupCommand as the parent command. *Removes unneeded further execution of revertTasks method upon the completion of each RemoveImage. *In case of import vm failure, the disks will be removed during RemoveImage endSuccesfully method. Change-Id: I0f767fcfa05d48ba085910dac7a1b746601381a9 Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/29/11329/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java index 99229fb..a3f2e84 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyImageGroupCommand.java @@ -194,8 +194,12 @@ Guid destImageId = getParameters().getDestinationImageId(); RemoveImageParameters removeImageParams = new RemoveImageParameters(destImageId); - removeImageParams.setParentParameters(getParameters()); - removeImageParams.setParentCommand(VdcActionType.MoveOrCopyImageGroup); + removeImageParams.setParentParameters(removeImageParams); + removeImageParams.setParentCommand(VdcActionType.RemoveImage); + if (getParameters().getParentCommand() == VdcActionType.ImportVm) { + removeImageParams.setRemoveDuringExecution(false); + removeImageParams.setRemoveFromDB(true); + } removeImageParams.setEntityId(getDestinationImageId()); // Setting the image as the monitored entity, so there will not be dependency VdcReturnValueBase returnValue = -- To view, visit http://gerrit.ovirt.org/11329 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0f767fcfa05d48ba085910dac7a1b746601381a9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches