Change in ovirt-engine[ovirt-engine-3.4]: core: managed removal of memory volumes in negative flows

iheim at redhat.com iheim at redhat.com
Wed Jan 29 12:42:09 UTC 2014


Itamar Heim 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 <ahadas at 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/23821
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4b270ec0e1ab41cae34459dde9f9cf47b1b5bdf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list