Daniel Erez has posted comments on this change.

Change subject: core: prevent disabling VirtIO-SCSI on edit VM
......................................................................


Patch Set 1:

(2 comments)

I'm not sure it worth the complexity to block it from the UI (seems like a 
corner case that blocking with canDo is sufficient). Anyway, we might add it 
later on.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 370:                 
!FeatureSupported.virtIoScsi(getVdsGroup().getcompatibility_version())) {
Line 371:             return 
failCanDoAction(VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL);
Line 372:         }
Line 373: 
Line 374:         if 
(Boolean.FALSE.equals(getParameters().isVirtioScsiEnabled())) {
null is defaulted to true on cluster >= 3.3. So the only interesting case is 
when the user explicitly request to disable VirtIO-SCSI
Line 375:             List<Disk> allDisks = getDiskDao().getAllForVm(getVmId(), 
true);
Line 376:             for (Disk disk : allDisks) {
Line 377:                 if (disk.getDiskInterface() == 
DiskInterface.VirtIO_SCSI) {
Line 378:                     return 
failCanDoAction(VdcBllMessages.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS);


Line 371:             return 
failCanDoAction(VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL);
Line 372:         }
Line 373: 
Line 374:         if 
(Boolean.FALSE.equals(getParameters().isVirtioScsiEnabled())) {
Line 375:             List<Disk> allDisks = getDiskDao().getAllForVm(getVmId(), 
true);
can we add this in a follow-up patch?
Line 376:             for (Disk disk : allDisks) {
Line 377:                 if (disk.getDiskInterface() == 
DiskInterface.VirtIO_SCSI) {
Line 378:                     return 
failCanDoAction(VdcBllMessages.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS);
Line 379:                 }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2e6c85a2df434de3180f19a32079f276458d372
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Cheryn Tan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[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