Ala Hino has posted comments on this change. Change subject: core: Prevent VM migration when SCSI reservation is used ......................................................................
Patch Set 9: (3 comments) https://gerrit.ovirt.org/#/c/37664/9/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java: Line 378: } Line 379: Line 380: VmValidator vmValidator = new VmValidator(vm); Line 381: ValidationResult validationResult = vmValidator.isVmPluggedDiskUsingScsiReservation(); Line 382: if (validationResult != ValidationResult.VALID) { > please use the standard format for checking Done Line 383: return failCanDoAction(validationResult.getMessage()); Line 384: } Line 385: Line 386: switch (vm.getStatus()) { https://gerrit.ovirt.org/#/c/37664/9/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java: Line 680: return readOnlyNewValue != null && !getVmDeviceForVm().getIsReadOnly().equals(readOnlyNewValue); Line 681: } Line 682: Line 683: private boolean updateIsUsingScsiReservationRequested(LunDisk lunDisk) { Line 684: return getVmDeviceForVm().isUsingScsiReservation() != Boolean.TRUE.equals(lunDisk.isUsingScsiReservation()); > this won't work. Done Line 685: } Line 686: Line 687: protected boolean updateWipeAfterDeleteRequested() { Line 688: return getNewDisk().isWipeAfterDelete() != getOldDisk().isWipeAfterDelete(); https://gerrit.ovirt.org/#/c/37664/9/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LunDisk.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/LunDisk.java: Line 50: @Override Line 51: public int hashCode() { Line 52: final int prime = 31; Line 53: int result = super.hashCode(); Line 54: result = prime * result + (Boolean.TRUE.equals(usingScsiReservation) ? 1231 : 1237); > I'd prefer an implementation similar to line 55 here. Done Line 55: result = prime * result + ((lun == null) ? 0 : lun.hashCode()); Line 56: return result; Line 57: } Line 58: -- To view, visit https://gerrit.ovirt.org/37664 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia38c03dae04c9dbb30c882941391b1909f5af416 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ala Hino <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Ala Hino <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Candace Sheremeta <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Freddy Rolland <[email protected]> Gerrit-Reviewer: Greg Padgett <[email protected]> Gerrit-Reviewer: Idan Shaby <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Tomas Jelinek <[email protected]> Gerrit-Reviewer: Vered Volansky <[email protected]> Gerrit-Reviewer: [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
