Nir Soffer has posted comments on this change. Change subject: core: Use correct storage validation for MoveVM ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/24027/1//COMMIT_MSG Commit Message: Line 7: core: Use correct storage validation for MoveVM Line 8: Line 9: Fix MoveVMCommand to use the new (correct) Line 10: StorageDomainValidator.hasSpaceForClonedDisks(Iterable<DiskImage>) to Line 11: validate the destination domain has enough space. What was wrong with the old check? How the new "correct" validator is better? Line 12: Line 13: Change-Id: I7f455ff16d11622be4e28ea84180551237a80db1 http://gerrit.ovirt.org/#/c/24027/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java: Line 111: Line 112: private boolean destinationHasSpace(Collection<DiskImage> diskImages) { Line 113: StorageDomainValidator sdv = new StorageDomainValidator(getStorageDomain()); Line 114: return validate(sdv.isDomainWithinThresholds()) && Line 115: validate(sdv.hasSpaceForClonedDisks(diskImages)); > isn't the original method supposed to take the threshold in account to avoi I agree with Liron - seems that the check should be: used size + disk images size + threshold < capacity Line 116: } Line 117: Line 118: protected boolean checkTemplateInStorageDomain(List<DiskImage> diskImages) { Line 119: boolean retValue = checkStorageDomain() && checkStorageDomainStatus(StorageDomainStatus.Active) -- To view, visit http://gerrit.ovirt.org/24027 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7f455ff16d11622be4e28ea84180551237a80db1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vered Volansky <[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
