Roy Golan has posted comments on this change. Change subject: engine: validate (vm NUMA nodes) <= (vm CPU cores) ......................................................................
Patch Set 4: (2 comments) what about AddVm command? i guess needs validation there as well https://gerrit.ovirt.org/#/c/39317/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java: Line 862: /** Line 863: * Cannot have more vm NUMA nodes then vm CPU cores Line 864: */ Line 865: public static ValidationResult checkVmNumaNodesIntegrity(VM paramsVm, VM actualVm) { Line 866: List<VmNumaNode> vmNumaNodes = paramsVm.getvNumaNodeList(); what happen when we want to remove numa nodes? do we sent no nodes in the list? in that case is that check relevant? Line 867: if (vmNumaNodes == null || vmNumaNodes.isEmpty()){ // no NUMA nodes from parameters (empty parameter) Line 868: // try getting the actual vm NUMA nodes from database Line 869: vmNumaNodes = DbFacade.getInstance().getVmNumaNodeDAO().getAllVmNumaNodeByVmId(actualVm.getId()); Line 870: } Line 872: if (vmNumaNodes == null || vmNumaNodes.isEmpty()) // no NUMA nodes Line 873: return ValidationResult.VALID; Line 874: Line 875: int cpuCount = paramsVm.getNumOfCpus(); Line 876: if (cpuCount == 0) // no CPU count from parameters (empty parameter) again, make sure empty parameters meaning. Line 877: cpuCount = actualVm.getNumOfCpus(); Line 878: Line 879: if (cpuCount < vmNumaNodes.size()) { Line 880: return new ValidationResult(VdcBllMessages.VM_NUMA_NODE_MORE_NODES_THEN_CPUS, -- To view, visit https://gerrit.ovirt.org/39317 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4589721f3d9fa76509d2931b351c5517c06df334 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dudi Maroshi <d...@redhat.com> Gerrit-Reviewer: Dudi Maroshi <d...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@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