Change in ovirt-engine[master]: core: vm from template - revert flow

Code Review gerrit at ovirt.org
Tue Mar 14 13:40:09 UTC 2017


>From Liron Aravot <laravot at redhat.com>:

Liron Aravot has submitted this change and it was merged.

Change subject: core: vm from template - revert flow
......................................................................


core: vm from template - revert flow

When failing on creation of desktop/server vm based on a template
currently there is no rollback of the created disks in case of failure
to complete the entire operation.
For server vms the rollback was never implemented while for desktop vms
the rollback isn't perform since the flow was updated to use the coco
framework (as it was performed using the SPMRevertTask).
As the endWithFailure() method is shared between the flows, this patch
adds the rollback for both.

Note that is this patch is targeted to the 4.1 branch the solution isn't
yet complete - the flow should be rewritten so that the disk is added in
transaction and then the copy flow is initiated.
In case of failure to complete the creation/copy the engine should
attempt
to remove the disk, if the removal fails the disk should remain in
ILLEGAL status so that the user will be able to attempt to delete it to
free the space used by it.

Change-Id: I530f522cd9fe064bb2844ed89f8d4877b25af0f5
Bug-Url: https://bugzilla.redhat.com/1426136
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateCloneOfTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/CreateSnapshotCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/CreateSnapshotFromTemplateCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
5 files changed, 41 insertions(+), 0 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Liron Aravot: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I530f522cd9fe064bb2844ed89f8d4877b25af0f5
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list