Maor Lipchuk has posted comments on this change.

Change subject: core: Support preview for Cinder snapshot
......................................................................


Patch Set 1:

(4 comments)

https://gerrit.ovirt.org/#/c/42256/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TryBackToAllSnapshotsOfVmCommand.java:

Line 121: 
Line 122:         setSucceeded(true);
Line 123:     }
Line 124: 
Line 125:     protected void restoreVmConfigFromSnapshot() {
> In which sub-class are you using it?
git war remaining, changed back to private
Line 126:         
getSnapshotDao().updateStatus(getParameters().getDstSnapshotId(), 
SnapshotStatus.IN_PREVIEW);
Line 127:         
getSnapshotDao().updateStatus(getSnapshotDao().getId(getVm().getId(),
Line 128:                 SnapshotType.PREVIEW,
Line 129:                 SnapshotStatus.LOCKED),


Line 213:                         }
Line 214:                     }
Line 215:                     if (!cinderDisks.isEmpty() &&
Line 216:                             !tryBackAllCinderDisks(cinderDisks, 
newActiveSnapshotId)) {
Line 217:                         throw new 
VdcBLLException(VdcBllErrors.CINDER_ERROR);
> you should add some informative message..
Done
Line 218:                     }
Line 219:                     return null;
Line 220:                 }
Line 221: 


Line 230:                     return params;
Line 231:                 }
Line 232:             });
Line 233:         }
Line 234:         setSucceeded(returnValue);
> Are you setting it to false in any flow?
nope removed
Line 235:     }
Line 236: 
Line 237:     protected boolean tryBackAllCinderDisks( List<CinderDisk> 
cinderDisks, Guid newSnapshotId) {
Line 238:         Future<VdcReturnValueBase> future = 
CommandCoordinatorUtil.executeAsyncCommand(


Line 281:     private List<DiskImage> 
getImagesExcludedFromPreview(List<DiskImage> images, Guid 
previousActiveSnapshotId, Guid newActiveSnapshotId) {
Line 282:         List<DiskImage> excludedImages = new ArrayList<>();
Line 283: 
Line 284:         for (DiskImage image : images) {
Line 285:             if (((image.getDiskStorageType() == 
DiskStorageType.IMAGE) ||
> worth having some generic method for checking 'IMAGE || CINDER'.. maybe eve
I was thinking maybe disk refactor will handle this, but what the hell I will 
add one
Line 286:                     (image.getDiskStorageType() == 
DiskStorageType.CINDER))
Line 287:                     && 
image.getVmSnapshotId().equals(previousActiveSnapshotId)) {
Line 288:                 // Image is already active, hence only update 
snapshot ID.
Line 289:                 
getImageDao().updateImageVmSnapshotId(image.getImageId(), newActiveSnapshotId);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8c7f7a9505ff965b0cded35c395e5bfb8529aaa
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to