Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cluster-up, kind, common: Enable TopologyManager for kind-sriov (#1347)
SRIOV tests check topology alignment. Currently in kind/sriov kueblet does not attempt to align resources. In SRIOV alignment test, we call the function hardware.LookupDeviceVCPUAffinity(). This function returns a slice of aligned CPUs, i.e. (complex sentence ahead warning) CPU numbers, that are assigned to the guest, which share a NUMA with SRIOV VFs, that are also passed to the guest. In other words: If an app is running in the guest, and using a network interface, that NIC is physically close to its CPU, and it doesn't have to cross the system bus to get to it. Back to LookupDeviceVCPUAffinity(): if it finds that there is no aligment, it doesn't err, it just returns an empty slice. As the test is currently written, an empty list is fine i.e. no alignment: it simply validates that the guest knows that there's no alignment, by validating it in the cloud-init metadata file in the guest. This change adding a topology manager policy of single-numa-node, forces alignment. If alignment is not achieved, scheduling will fail. We will also assert in the test that the alignment slice is not empty. Add topology manager[1] to kubelet config and set its policy to single-numa-node. Together with cpu-manager policy=static, which we already set, kubelet will reject a pod that it is unable to align. [1] https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/ Signed-off-by: Nir Dothan <[email protected]>
- Loading branch information