Roy Golan has posted comments on this change. Change subject: engine: NUMA feature queries and actions validation ......................................................................
Patch Set 13: (6 comments) http://gerrit.ovirt.org/#/c/27617/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/numa/vm/AbstractVmNumaNodeCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/numa/vm/AbstractVmNumaNodeCommand.java: Line 38: // if VM do not contain any NUMA node, skip checking Line 39: return true; Line 40: } Line 41: Line 42: VM vm = getVm(); will not work for a new VM Line 43: boolean pinHost = !Config.<Boolean>getValue(ConfigValues.NUMAMigration); Line 44: Guid vdsId = vm.getDedicatedVmForVds(); Line 45: if (pinHost && vdsId == null) { Line 46: return failCanDoAction(VdcBllMessages.VM_NUMA_PINNED_VDS_NOT_EXIST); Line 39: return true; Line 40: } Line 41: Line 42: VM vm = getVm(); Line 43: boolean pinHost = !Config.<Boolean>getValue(ConfigValues.NUMAMigration); format this line Line 44: Guid vdsId = vm.getDedicatedVmForVds(); Line 45: if (pinHost && vdsId == null) { Line 46: return failCanDoAction(VdcBllMessages.VM_NUMA_PINNED_VDS_NOT_EXIST); Line 47: } Line 41: Line 42: VM vm = getVm(); Line 43: boolean pinHost = !Config.<Boolean>getValue(ConfigValues.NUMAMigration); Line 44: Guid vdsId = vm.getDedicatedVmForVds(); Line 45: if (pinHost && vdsId == null) { we should verify also the host exist and belongs to this cluster. btw what happen when a host is removed, or the VM is moved to a different cluster? Line 46: return failCanDoAction(VdcBllMessages.VM_NUMA_PINNED_VDS_NOT_EXIST); Line 47: } Line 48: Line 49: List<VdsNumaNode> vdsNumaNodes = new ArrayList<>(); Line 47: } Line 48: Line 49: List<VdsNumaNode> vdsNumaNodes = new ArrayList<>(); Line 50: if (pinHost) { Line 51: vdsNumaNodes = getVdsNumaNodeDao().getAllVdsNumaNodeByVdsId(vdsId); very hard to read. we have to start using hostNuma and vmNuma instead of vdsNuma and vmNuma they look the same. Line 52: if (vdsNumaNodes == null || vdsNumaNodes.size() == 0) { Line 53: return failCanDoAction(VdcBllMessages.VM_NUMA_PINNED_VDS_NODE_EMPTY); Line 54: } Line 55: } http://gerrit.ovirt.org/#/c/27617/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/numa/vm/AddVmNumaNodesCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/numa/vm/AddVmNumaNodesCommand.java: Line 43: nodes.add(vmNumaNode); Line 44: } Line 45: getVmNumaNodeDao().massSaveNumaNode(nodes, null, vmId); Line 46: Line 47: // Used for restful API for reture first NUMA node GUID what is reture? Line 48: setActionReturnValue(nodes.get(0).getId()); Line 49: Line 50: setSucceeded(true); Line 51: } http://gerrit.ovirt.org/#/c/27617/13/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java: Line 1947: * Defines the parameter name used by numa migration on/off Line 1948: */ Line 1949: @TypeConverterAttribute(Boolean.class) Line 1950: @DefaultValueAttribute("false") Line 1951: NUMAMigration, naming - should be SupportNUMAMigration like the convention Line 1952: Line 1953: @TypeConverterAttribute(List.class) Line 1954: @DefaultValueAttribute("") Line 1955: @OptionBehaviourAttribute(behaviour = OptionBehaviour.CommaSeparatedStringArray) -- To view, visit http://gerrit.ovirt.org/27617 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c299405ec5d82ada713ed3d220554bf3055c145 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Jason Liao <chuan.l...@hp.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jason Liao <chuan.l...@hp.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Xiaolei Shi <xiao-lei....@hp.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