Omer Frenkel has submitted this change and it was merged. Change subject: core: managed removal of memory volumes in negative flows ......................................................................
core: managed removal of memory volumes in negative flows On failure while importing VM or creating snapshot with memory, we need to remove the memory volumes that were copied/created. The remove image operation is asynchronous, i.e it is based on tasks. On negative flows such as the ones mentioned above, we need to remove the memory image in the end-action phase. Since our infrastructure for commands doesn't support scenarios where tasks are created in the end-action phase well, we used to create the tasks for the remove operation without polling them. The problem was that without polling the tasks they remained in VDSM forever. The solution is to invoke the command that removes memory volumes as a stand-alone command, and not as a child of the failed command. It means that the tasks will be created as tasks of RemoveMemoryVolumesCommand and thus its end-action methods will be called and not the ones of the failed command. Change-Id: Ib4b270ec0e1ab41cae34459dde9f9cf47b1b5bdf Bug-Url: https://bugzilla.redhat.com/1019394 Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveMemoryVolumesCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemover.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverOnDataDomain.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RemoveMemoryVolumesParameters.java 7 files changed, 88 insertions(+), 57 deletions(-) Approvals: Omer Frenkel: Looks good to me, approved Arik Hadas: Verified -- To view, visit http://gerrit.ovirt.org/23222 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4b270ec0e1ab41cae34459dde9f9cf47b1b5bdf Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches