Allon Mureinik has posted comments on this change.

Change subject: core: Prevent VM migration when SCSI reservation is used
......................................................................


Patch Set 11: Code-Review+1

(2 comments)

Generally looks good, minor comments

https://gerrit.ovirt.org/#/c/37664/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java:

Line 642: 
Line 643:         VmValidator vmValidator = createVmValidator(vmFromParams);
Line 644:         ValidationResult validationResult = 
vmValidator.isVmPluggedDiskUsingScsiReservation();
Line 645:         // check that is vm uses scsi reservation, then migration 
support should be null
Line 646:         if (validationResult != ValidationResult.VALID && 
vmFromParams.getMigrationSupport() != null) {
I'd use 

  if (!validationResult.isValid() && vmFromParams.getMigrationSupport() != null)
Line 647:             return 
failCanDoAction(VdcBllMessages.MIGRATION_SUPPORT_NOT_VALID_WHEN_VM_USES_SCSI_RESERVATION);
Line 648:         }
Line 649: 
Line 650:         if 
(!validatePinningAndMigration(getReturnValue().getCanDoActionMessages(),


https://gerrit.ovirt.org/#/c/37664/11/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 406:                 }
Line 407:             }
Line 408: 
Line 409:             private void updateLunProperties(LunDisk lunDisk) {
Line 410:                     if 
(updateIsUsingScsiReservationRequested(lunDisk)) {
please fix the indentation here
Line 411:                     
vmDeviceForVm.setUsingScsiReservation(lunDisk.isUsingScsiReservation());
Line 412:                     getVmDeviceDao().update(vmDeviceForVm);
Line 413:                 }
Line 414:             }


-- 
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: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Candace Sheremeta <csher...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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