Change in ovirt-engine[ovirt-engine-3.6]: core: remove memory and conf volumes on VM removal

tnisan at redhat.com tnisan at redhat.com
Tue Dec 15 14:19:08 UTC 2015


Tal Nisan has submitted this change and it was merged.

Change subject: core: remove memory and conf volumes on VM removal
......................................................................


core: remove memory and conf volumes on VM removal

When removing a VM, there's no case where we would not like to remove
the memory and configuration volumes of the VM. Thus, RemoveVmCommand
should always remove them using RemoveMemoryVolumesCommand.

This patch adds a flag named "forceRemove" to
RemoveMemoryVolumesParameters.
Setting "forceRemove" to true creates a bypass in
MemoryImageRemoverOnDataDomain.isMemoryStateRemovable, such that for
every memoryVolume, isMemoryStateRemovable returns true and the volume
is eventually removed.
Passing forceRemove = true by RemoveVmCommand does the trick.

Change-Id: Ieed64de46eb23e5677988b13828e97a5f3a873a1
Bug-Url: https://bugzilla.redhat.com/1282789
Signed-off-by: Idan Shaby <ishaby at redhat.com>
---
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/MemoryImageRemoverOnDataDomain.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RemoveMemoryVolumesParameters.java
4 files changed, 23 insertions(+), 3 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Arik Hadas: Looks good to me, approved
  Idan Shaby: Verified



-- 
To view, visit https://gerrit.ovirt.org/50527
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieed64de46eb23e5677988b13828e97a5f3a873a1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list