Allon Mureinik has posted comments on this change.

Change subject: core: MoveOrCopyDiskCommand space verification
......................................................................


Patch Set 2: Code-Review-1

(5 comments)

....................................................
Commit Message
Line 5: CommitDate: 2013-12-17 09:09:19 +0200
Line 6: 
Line 7: core: MoveOrCopyDiskCommand space verification
Line 8: 
Line 9: This is a part in a series of patches intended to fix storage space
s/in/of/
Line 10: allocation validation throughout the system (see bz).
Line 11: Added hasSpaceForClonedDisk(s) in StorageDomainValidator.
Line 12: Applied use in MoveOrCopyDiskCommand (former use is buggy).
Line 13: 


Line 8: 
Line 9: This is a part in a series of patches intended to fix storage space
Line 10: allocation validation throughout the system (see bz).
Line 11: Added hasSpaceForClonedDisk(s) in StorageDomainValidator.
Line 12: Applied use in MoveOrCopyDiskCommand (former use is buggy).
s/is/was/
Line 13: 
Line 14: Change-Id: I951aeb531cb7ff7aaf3f1d50fc55100b6a806059
Line 15: Bug-url: https://bugzilla.redhat.com/960934


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 334
Line 335
Line 336
Line 337
Line 338
Unrelated to the patch - please perform this cleanup in a separate patch.


Line 187:      * vm should be down
Line 188:      * @return
Line 189:      */
Line 190:     protected boolean checkCanBeMoveInVm() {
Line 191:         return 
validate(createDiskValidator().isDiskPluggedToVmsThatAreNotDown(false, 
getVmsWithVmDeviceInfoForDiskId()));
Unrelated to this patch. Please perform this cleanup in a separate patch.
Line 192:     }
Line 193: 
Line 194:     /**
Line 195:      * Cache method to retrieve all the VMs with the device info 
related to the image


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageDomainValidator.java
Line 176:     }
Line 177: 
Line 178:     private void addImageSnapshots(DiskImage diskImage) {
Line 179:         List<DiskImage> snapshots = 
ImagesHandler.getAllImageSnapshots(diskImage.getImageId(), 
diskImage.getImageTemplateId());
Line 180:         diskImage.getSnapshots().addAll(snapshots);
This changes the state of the disk passed for validation, which is kind of a 
foul-play for a validator.

Let's keep the design in the spirit of the other validators in the engine - the 
command loads stuff from the DB, the validator just validates them.
Line 181:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I951aeb531cb7ff7aaf3f1d50fc55100b6a806059
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to