Omer Frenkel has posted comments on this change. Change subject: core: validate max lun disk attachment ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java Line 117: if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { Line 118: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); Line 119: } Line 120: Line 121: return isDiskPassPciAndIdeLimit(getParameters().getDiskInfo()); isDiskPassPciAndIdeLimit assume vm exists, so this is a potential error here. please check if vm exist before calling this, like done in checkIfImageDiskCanBeAdded() or extract this common code somewhere else Line 122: } Line 123: Line 124: private boolean checkIfImageDiskCanBeAdded(VM vm) { Line 125: boolean returnValue; -- To view, visit http://gerrit.ovirt.org/9409 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a82b3ed85c89beb8df70315ad457f54b366d69d Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches