Allon Mureinik has posted comments on this change.

Change subject: core: Check all attached VMs when updating shared disk boot flag
......................................................................


Patch Set 2: (3 inline comments)

see inline

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
Line 278:             for (Disk disk : vm.getDiskMap().values()) {
Line 279:                 if (disk.isBoot()) {
Line 280:                     if (vmsContainBootDisk) { // In case this is not 
the first VM to fail, add delimiter
Line 281:                         vmsContainingBootDisk.append(", ");
Line 282:                     }
Just save them all to a list, and use StringUtils.joing(badDisks, ",")
Line 283:                     vmsContainingBootDisk.append(vm.getName());
Line 284:                     vmsContainBootDisk = true;
Line 285:                 }
Line 286:             }


Line 289:         if (vmsContainBootDisk) {
Line 290:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VMS_BOOT_IN_USE);
Line 291:             getReturnValue().getCanDoActionMessages().add(
Line 292:                     String.format("$VmsName %1$s", 
vmsContainingBootDisk.toString()));
Line 293:             return false;
Return a ValidationResult instead of a boolean, and use validate in the calling 
method (canDoAction)
Line 294:         }
Line 295: 
Line 296:         return true;
Line 297:     }


....................................................
Commit Message
Line 14: disk fail and give an error message containing all of the VMs that the 
operation
Line 15: failed on
Line 16: 
Line 17: Bug-Url: https://bugzilla.redhat.com/949923
Line 18: 
Please remove the whitespace here - it muddles up some of our scripts
Line 19: Change-Id: I82ee07e02e08d60f559017d9f8205ab7df41c5c3


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I82ee07e02e08d60f559017d9f8205ab7df41c5c3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@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: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to