Allon Mureinik has posted comments on this change.

Change subject: core,webadmin: Plug disk to VM when adding a new disk
......................................................................


Patch Set 2:

(2 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 98:                 return false;
Line 99:             }
Line 100:         }
Line 101:         else {
Line 102:             if (getParameters().getPlugDiskToVm()) {
No.
null means I don't want to force the behavior, and remain backwards compatible 
to 3.3 (i.e., plug for downed vms, don't for up vms)
true/false means I want to override the default.
Line 103:                 return 
failCanDoAction(VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET);
Line 104:             }
Line 105:         }
Line 106: 


Line 367:                 StorageDomainCommandBase.proceedLUNInDb(lun, 
lun.getLunType());
Line 368:                 getBaseDiskDao().save(getParameters().getDiskInfo());
Line 369:                 getDiskLunMapDao().save(new 
DiskLunMap(getParameters().getDiskInfo().getId(), lun.getLUN_id()));
Line 370:                 if (getVm() != null) {
Line 371:                     boolean shouldPlugDisk = getVm().getStatus() == 
VMStatus.Down && (getParameters().getPlugDiskToVm() == null || 
getParameters().getPlugDiskToVm());
@Tal - with the current code in this patch, if the VM is UP and you send 
getPlugDiskToVm=true it still won't be plugged.
This surely isn't the intended behavior?
Line 372:                     VmDeviceUtils.addManagedDevice(new 
VmDeviceId(getParameters().getDiskInfo().getId(), getVmId()),
Line 373:                             VmDeviceGeneralType.DISK,
Line 374:                             VmDeviceType.DISK,
Line 375:                             null,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9778bcaf21b346a55992590159cabd8d78f0c66
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Cheryn Tan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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

Reply via email to