Liron Aravot has posted comments on this change.

Change subject: core: errors during preview of diskless snapshots
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
Line 135:                         "Active VM before the preview",
Line 136:                         SnapshotType.PREVIEW,
Line 137:                         getVm(),
Line 138:                         getCompensationContext());
Line 139:                 
snapshotsManager.addActiveSnapshot(newActiveSnapshotId, getVm(), 
getCompensationContext());
as we talked - may be added in the future to command base implementation to 
support it, seems to be less important as this flow will occur rarely and will 
have to add another checks to commands - the consuming operation isn't 
performed (stateChanged). right now we don't have support to it and it 
shouldn't added just to support one specific case.
Line 140:                 
snapshotsManager.removeAllIllegalDisks(previousActiveSnapshotId, 
getVm().getId());
Line 141:                 // if there are no images we can should restore the 
config now so it'll be executed within the transaction.
Line 142:                 if (!images.isEmpty()) {
Line 143:                     getCompensationContext().stateChanged();


Line 141:                 // if there are no images we can should restore the 
config now so it'll be executed within the transaction.
Line 142:                 if (!images.isEmpty()) {
Line 143:                     getCompensationContext().stateChanged();
Line 144:                 } else {
Line 145:                     restoreVmConfigFromSnapshot();
it'll be freed after execute is done in CommandBase.
Line 146:                 }
Line 147:                 return null;
Line 148:             }
Line 149:         });


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
Line 251: 
Line 252:     public static void updateDisksFromDb(VM vm) {
Line 253:         List<Disk> imageList = 
DbFacade.getInstance().getDiskDao().getAllForVm(vm.getId());
Line 254:         vm.getDiskList().clear();
Line 255:         vm.getDiskMap().clear();
it shouldn't, if same disk or disk that was already removed was in that list it 
was a bug.
Line 256:         updateDisksForVm(vm, imageList);
Line 257:     }
Line 258: 
Line 259:     public static void updateDisksForVm(VM vm, List<? extends Disk> 
diskList) {


--
To view, visit http://gerrit.ovirt.org/9128
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e8edc74bc34676f526dfd24d2f89eb60d8acf2e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to