Change in ovirt-engine[master]: core: remove vm - remove VM during execute
amureini at redhat.com
amureini at redhat.com
Wed May 8 10:57:23 UTC 2013
Allon Mureinik has submitted this change and it was merged.
Change subject: core: remove vm - remove VM during execute
......................................................................
core: remove vm - remove VM during execute
When removing vm the operation is done as synchronized operation, task
is created for each disk and then the vm is removed from db.
In order to deal with engine crash, in the end method a roll forward is
performed in case that the vm still exists (the vm is being deleted and
it's disks are being marked as illegal).
This logic is unneeded and can cause to a bug, in case of deleted vm and
imported vm with the same id, this can cause that the imported vm would
be
deleted from the db as the deletion tasks would end - therefore this
logic is being removed.
this patch contains the following changes:
1. the first step is to remove the vm, lock all the disks - in case of
failure they will be in ILLEGAL status.
2. added a boolean member indicating whether RemoveImage should lock the
image.
3. RemoveAllVmImages shouldn't fail in case of failure to create a task
for deletion, the engine should continue and try to delete the other
images- this change also prevents a storage leak in removing vm and
templates from export domains.
4. RemoveAllVmImages returns a list of disks it failed to remove,
instead of querying the db again.
Change-Id: I7a3e497e52471f7255e6c17b59a2e3bf362b8783
Signed-off-by: Liron Aravot <laravot at redhat.com>
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveAllVmImagesCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RemoveImageParameters.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
6 files changed, 47 insertions(+), 78 deletions(-)
Approvals:
Allon Mureinik: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/14569
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7a3e497e52471f7255e6c17b59a2e3bf362b8783
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
More information about the Engine-commits
mailing list