From 1b3b458d0dce649e28e39e2d04afd5b1e0264ebf Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Wed, 5 Feb 2020 09:41:51 +0100 Subject: [PATCH 1/3] document the configuration for topology manager The topology manager end-to-end tests require some extra configuration that we document here. Signed-off-by: Francesco Romani --- contributors/devel/sig-node/e2e-node-tests.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/contributors/devel/sig-node/e2e-node-tests.md b/contributors/devel/sig-node/e2e-node-tests.md index 31c0459ce0a..2563d396c13 100644 --- a/contributors/devel/sig-node/e2e-node-tests.md +++ b/contributors/devel/sig-node/e2e-node-tests.md @@ -251,3 +251,40 @@ The PR builder runs tests against the images listed in [jenkins-pull.properties] The post submit tests run against the images listed in [jenkins-ci.properties](https://git.k8s.io/kubernetes/test/e2e_node/jenkins/jenkins-ci.properties) + +# Notes on the Topology Manager tests + +The Topology Manager tests require a multi-numa node box (two or more nodes) with at least one SRIOV device installed to run. +The tests automatically skip if the conditions aren't met. + +The test code statically includes the manifests needed to configure the SRIOV device plugin. +However, is not possible to anticipate all the possible configuration, hence the included configuration is intentionally minimal. + +It is recommended you supply a ConfigMap describing the cards installed in the machine running the tests using TEST_ARGS. +[Here's the upstream reference](https://github.com/intel/sriov-network-device-plugin/blob/master/deployments/configMap.yaml) +```sh +make test-e2e-node TEST_ARGS='--sriovdp-configmap-file="/path/to/sriovdp-config-map.yaml"' +``` + +You must have the Virtual Functions (VFs) already created in the node you want to run the test on. +Example command to create the VFs - please note the PCI address of the SRIOV device depends on the host +system hardware. +```bash +cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sriov_numvfs +echo 7 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sriov_numvfs +``` + +Some topology manager tests require minimal knowledge of the host topology in order to be performed. +The required information is to which NUMA node in the system are the SRIOV device attached to. + +To enable these tests, the config map should supply annotations to convey this information: +```yaml +metadata: + annotations: + pcidevice_node0: 1 + pcidevice_node1: 0 + pcidevice_node2: 0 + pcidevice_node3: 0 +``` + +For each NUMA node, you should specify the number of SRIOV devices attached, even if it is zero. From 51417dc98dc8617ac8307f6470195710cb52120b Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Mon, 24 Feb 2020 13:44:28 +0100 Subject: [PATCH 2/3] topology manager tests: document autodetection The topology manager tests gained some support to autodetect the system information need to run them. It is still possible, and sometimes needed, to override the autodetected data, so update the docs accordingly. Signed-off-by: Francesco Romani --- contributors/devel/sig-node/e2e-node-tests.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contributors/devel/sig-node/e2e-node-tests.md b/contributors/devel/sig-node/e2e-node-tests.md index 2563d396c13..a342cafc4dc 100644 --- a/contributors/devel/sig-node/e2e-node-tests.md +++ b/contributors/devel/sig-node/e2e-node-tests.md @@ -276,8 +276,9 @@ echo 7 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sriov_numvfs Some topology manager tests require minimal knowledge of the host topology in order to be performed. The required information is to which NUMA node in the system are the SRIOV device attached to. +The test code tries to autodetect the information it needs, skipping the relevant tests if the autodetection fails. -To enable these tests, the config map should supply annotations to convey this information: +You can override the autodetection adding annotations to the the config map like this example: ```yaml metadata: annotations: @@ -287,4 +288,6 @@ metadata: pcidevice_node3: 0 ``` -For each NUMA node, you should specify the number of SRIOV devices attached, even if it is zero. +Please note that if you add the annotations, then you must provide the full information: +you must should specify the number of SRIOV devices attached to each NUMA node in the system, +even if the number is zero. From f03752f021b98eca6c91eaff923a37b76b7cc01a Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Mon, 2 Mar 2020 15:28:41 +0100 Subject: [PATCH 3/3] e2e: topology manager: properly quote labels Signed-off-by: Francesco Romani --- contributors/devel/sig-node/e2e-node-tests.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contributors/devel/sig-node/e2e-node-tests.md b/contributors/devel/sig-node/e2e-node-tests.md index a342cafc4dc..786076ddbfe 100644 --- a/contributors/devel/sig-node/e2e-node-tests.md +++ b/contributors/devel/sig-node/e2e-node-tests.md @@ -282,10 +282,10 @@ You can override the autodetection adding annotations to the the config map like ```yaml metadata: annotations: - pcidevice_node0: 1 - pcidevice_node1: 0 - pcidevice_node2: 0 - pcidevice_node3: 0 + pcidevice_node0: "1" + pcidevice_node1: "0" + pcidevice_node2: "0" + pcidevice_node3: "0" ``` Please note that if you add the annotations, then you must provide the full information: