Arik Hadas has posted comments on this change.
Change subject: backend: prevent live storage migration on live snapshot failure
......................................................................
Patch Set 2:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 310:
TransactionSupport.executeInScope(TransactionScopeOption.Suppress, new
TransactionMethod<Void>() {
Line 311: @Override
Line 312: public Void runInTransaction() {
Line 313: runVdsCommand(VDSCommandType.Snapshot,
buildLiveSnapshotParameters(snapshot));
Line 314: getParameters().setLiveSnapshotSucceeded(true);
calling the endSuccessfully method doesn't mean that the command ended
successfully, what it means is that the tasks were ended successfully. you can
still set the command as succeeded=false if the logic in the endSuccessfully
method fails. we do that for example when we run VM as stateless - if the
stateless snapshot was created successfully (it is a task), but we didn't
manage to run the VM after the stateless snapshot was created in the end-action
phase, we do setSucceeded(false) (see RunVmCommand#endSuccessfully()). so I
think it's ok to do setSucceeded(false) in endSuccessfully if needed - Ravi, am
I wrong?
Regarding reverting the task of volume creation, don't we want to remove those
volumes in that case? if we want to remove them but the revert operation just
doesn't work well then maybe we can just override it for that case somehow
until we'll have proper revert process?
Line 315: return null;
Line 316: }
Line 317: });
Line 318: } catch (VdcBLLException e) {
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDisksTaskHandler.java
Line 25: }
Line 26:
Line 27: @Override
Line 28: public void execute() {
Line 29: if
(!enclosingCommand.getParameters().getLiveSnapshotSucceeded()) {
SEAT = ?
Line 30: throw new VdcBLLException(VdcBllErrors.imageErr,
Line 31: "Auto-generated live snapshot for VM " +
enclosingCommand.getParameters().getVmId() + " failed");
Line 32: }
Line 33:
--
To view, visit http://gerrit.ovirt.org/20668
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7c69f663836e74691c968f4a15c5f3012479a8b0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches