From abbd21ba1908f1d814e692abdff419fdff2c9280 Mon Sep 17 00:00:00 2001 From: Yurii Prokulevych Date: Wed, 19 Jun 2024 19:14:28 +0200 Subject: [PATCH] system-test: test workloads with different SR-IOV networks (#55) --- .../rdscorecommon/sriov-validation.go | 356 ++++++++++++++++++ .../rdscore/internal/rdscoreconfig/config.go | 54 +++ .../internal/rdscoreconfig/default.yaml | 28 ++ .../rdscore/tests/00_validate_top_level.go | 10 + 4 files changed, 448 insertions(+) diff --git a/tests/system-tests/rdscore/internal/rdscorecommon/sriov-validation.go b/tests/system-tests/rdscore/internal/rdscorecommon/sriov-validation.go index 1642648d3..0a2515fec 100644 --- a/tests/system-tests/rdscore/internal/rdscorecommon/sriov-validation.go +++ b/tests/system-tests/rdscore/internal/rdscorecommon/sriov-validation.go @@ -32,12 +32,20 @@ const ( sriovDeploy1TwoName = "rdscore-sriov-two" sriovDeploy2OneName = "rdscore-sriov2-one" sriovDeploy2TwoName = "rdscore-sriov2-two" + sriovDeploy3OneName = "rdscore-sriov3-one" + sriovDeploy3TwoName = "rdscore-sriov3-two" + sriovDeploy4OneName = "rdscore-sriov4-one" + sriovDeploy4TwoName = "rdscore-sriov4-two" // ConfigMap names. sriovDeploy1CMName = "rdscore-sriov-config" sriovDeploy2CMName = "rdscore-sriov2-config" + sriovDeploy3CMName = "rdscore-sriov3-config" + sriovDeploy4CMName = "rdscore-sriov4-config" // ServiceAccount names. sriovDeploy1SAName = "rdscore-sriov-sa-one" sriovDeploy2SAName = "rdscore-sriov-sa-two" + sriovDeploy3SAName = "rdscore-sriov-sa-3" + sriovDeploy4SAName = "rdscore-sriov-sa-4" // Container names within deployments. sriovContainerOneName = "sriov-one" sriovContainerTwoName = "sriov-two" @@ -46,12 +54,20 @@ const ( sriovDeployTwoLabel = "rds-core=sriov-deploy-two" sriovDeploy2OneLabel = "rds-core=sriov-deploy2-one" sriovDeploy2TwoLabel = "rds-core=sriov-deploy2-two" + sriovDeploy3OneLabel = "rds-core=sriov-deploy3-one" + sriovDeploy3TwoLabel = "rds-core=sriov-deploy3-two" + sriovDeploy4OneLabel = "rds-core=sriov-deploy4-one" + sriovDeploy4TwoLabel = "rds-core=sriov-deploy4-two" // RBAC names for the deployments. sriovDeployRBACName = "privileged-rdscore-sriov" sriovDeployRBACName2 = "privileged-rdscore-sriov2" + sriovDeployRBACName3 = "privileged-rdscore-sriov3" + sriovDeployRBACName4 = "privileged-rdscore-sriov4" // ClusterRole to use with RBAC. sriovRBACRole = "system:openshift:scc:privileged" sriovRBACRole2 = "system:openshift:scc:privileged" + sriovRBACRole3 = "system:openshift:scc:privileged" + sriovRBACRole4 = "system:openshift:scc:privileged" ) func createServiceAccount(saName, nsName string) { @@ -955,6 +971,346 @@ func VerifySRIOVConnectivityOnSameNode(ctx SpecContext) { } } +// VerifySRIOVWorkloadsOnSameNodeDifferentNet deploy worklods with different SRIOV networks on the same node +// +//nolint:funlen +func VerifySRIOVWorkloadsOnSameNodeDifferentNet(ctx SpecContext) { + By("Checking SR-IOV deployments don't exist") + + deleteDeployments(sriovDeploy3OneName, RDSCoreConfig.WlkdSRIOV3NS) + deleteDeployments(sriovDeploy3TwoName, RDSCoreConfig.WlkdSRIOV3NS) + + By(fmt.Sprintf("Ensuring pods from %q deployment are gone", sriovDeploy3OneName)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Ensuring pods from %q deployment in %q namespace are gone", + sriovDeploy3OneName, RDSCoreConfig.WlkdSRIOV3NS) + + Eventually(func() bool { + oldPods, _ := pod.List(APIClient, RDSCoreConfig.WlkdSRIOV3NS, + metav1.ListOptions{LabelSelector: sriovDeploy3OneLabel}) + + return len(oldPods) == 0 + + }).WithContext(ctx).WithPolling(3*time.Second).WithTimeout(6*time.Minute).Should(BeTrue(), + "pods matching label() still present") + + By(fmt.Sprintf("Ensuring pods from %q deployment are gone", sriovDeploy3TwoName)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Ensuring pods from %q deployment in %q namespace are gone", + sriovDeploy3TwoName, RDSCoreConfig.WlkdSRIOV3NS) + + Eventually(func() bool { + oldPods, _ := pod.List(APIClient, RDSCoreConfig.WlkdSRIOV3NS, + metav1.ListOptions{LabelSelector: sriovDeploy3TwoLabel}) + + return len(oldPods) == 0 + + }).WithContext(ctx).WithPolling(3*time.Second).WithTimeout(6*time.Minute).Should(BeTrue(), + "pods matching label() still present") + + By("Removing ConfigMap") + + deleteConfigMap(sriovDeploy3CMName, RDSCoreConfig.WlkdSRIOV3NS) + + By("Creating ConfigMap") + + createConfigMap(sriovDeploy3CMName, + RDSCoreConfig.WlkdSRIOV3NS, RDSCoreConfig.WlkdSRIOVConfigMapData3) + + By("Removing ServiceAccount") + + deleteServiceAccount(sriovDeploy3SAName, RDSCoreConfig.WlkdSRIOV3NS) + + By("Creating ServiceAccount") + + createServiceAccount(sriovDeploy3SAName, RDSCoreConfig.WlkdSRIOV3NS) + + By("Removing Cluster RBAC") + + deleteClusterRBAC(sriovDeployRBACName3) + + By("Creating Cluster RBAC") + + createClusterRBAC(sriovDeployRBACName3, sriovRBACRole3, + sriovDeploy3SAName, RDSCoreConfig.WlkdSRIOV3NS) + + By("Defining container configuration") + + deployContainer := defineContainer(sriovContainerOneName, RDSCoreConfig.WlkdSRIOVDeploy3Image, + RDSCoreConfig.WlkdSRIOVDeploy3OneCmd, RDSCoreConfig.WldkSRIOVDeploy3OneResRequests, + RDSCoreConfig.WldkSRIOVDeploy3OneResLimits) + + deployContainerTwo := defineContainer(sriovContainerTwoName, RDSCoreConfig.WlkdSRIOVDeploy3Image, + RDSCoreConfig.WlkdSRIOVDeploy3TwoCmd, RDSCoreConfig.WldkSRIOVDeploy3TwoResRequests, + RDSCoreConfig.WldkSRIOVDeploy3TwoResLimits) + + By("Obtaining container definition") + + deployContainerCfg, err := deployContainer.GetContainerCfg() + Expect(err).ToNot(HaveOccurred(), "Failed to get container definition") + + deployContainerTwoCfg, err := deployContainerTwo.GetContainerCfg() + Expect(err).ToNot(HaveOccurred(), "Failed to get container definition") + + By("Defining 1st deployment configuration") + + deployOneLabels := map[string]string{ + strings.Split(sriovDeploy3OneLabel, "=")[0]: strings.Split(sriovDeploy3OneLabel, "=")[1]} + + deploy := defineDeployment(deployContainerCfg, + sriovDeploy3OneName, + RDSCoreConfig.WlkdSRIOV3NS, + RDSCoreConfig.WlkdSRIOVNetOne, + sriovDeploy3CMName, + sriovDeploy3SAName, + deployOneLabels, + RDSCoreConfig.WlkdSRIOVDeploy3OneSelector) + + By("Creating deployment one") + + deploy, err = deploy.CreateAndWaitUntilReady(5 * time.Minute) + Expect(err).ToNot(HaveOccurred(), + fmt.Sprintf("Failed to create deployment %s: %v", sriovDeploy3OneName, err)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Deployment %q created in %q namespace", + deploy.Definition.Name, deploy.Definition.Namespace) + + By("Defining 2nd deployment") + + deployTwoLabels := map[string]string{ + strings.Split(sriovDeploy3TwoLabel, "=")[0]: strings.Split(sriovDeploy3TwoLabel, "=")[1]} + + deployTwo := defineDeployment(deployContainerTwoCfg, + sriovDeploy3TwoName, + RDSCoreConfig.WlkdSRIOV3NS, + RDSCoreConfig.WlkdSRIOVNetTwo, + sriovDeploy3CMName, + sriovDeploy3SAName, + deployTwoLabels, + RDSCoreConfig.WlkdSRIOVDeploy3OneSelector) + + By("Creating 2nd deployment") + + deployTwo, err = deployTwo.CreateAndWaitUntilReady(5 * time.Minute) + Expect(err).ToNot(HaveOccurred(), + fmt.Sprintf("Failed to create deployment %s: %v", sriovDeploy3TwoName, err)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Deployment %q created in %q namespace", + deployTwo.Definition.Name, deployTwo.Definition.Namespace) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Verify connectivity between SR-IOV workloads on the same node") + + addressesList := []string{RDSCoreConfig.WlkdSRIOVDeploy3OneTargetAddress, + RDSCoreConfig.WlkdSRIOVDeploy3OneTargetAddressIPv6} + + for _, targetAddress := range addressesList { + if targetAddress == "" { + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Skipping empty address %q", targetAddress) + + continue + } + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Access workload via %q", targetAddress) + + verifySRIOVConnectivity( + RDSCoreConfig.WlkdSRIOV3NS, + RDSCoreConfig.WlkdSRIOV3NS, + sriovDeploy3OneLabel, + sriovDeploy3TwoLabel, + targetAddress) + } + + addressesList = []string{RDSCoreConfig.WlkdSRIOVDeploy3TwoTargetAddress, + RDSCoreConfig.WlkdSRIOVDeploy3TwoTargetAddressIPv6} + + for _, targetAddress := range addressesList { + if targetAddress == "" { + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Skipping empty address %q", targetAddress) + + continue + } + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Access workload via %q", targetAddress) + + verifySRIOVConnectivity( + RDSCoreConfig.WlkdSRIOV3NS, + RDSCoreConfig.WlkdSRIOV3NS, + sriovDeploy3TwoLabel, + sriovDeploy3OneLabel, + targetAddress) + } +} + +// VerifySRIOVWorkloadsOnDifferentNodesDifferentNet deploy worklods with different SRIOV networks on different nodes +// +//nolint:funlen +func VerifySRIOVWorkloadsOnDifferentNodesDifferentNet(ctx SpecContext) { + By("Checking SR-IOV deployments don't exist") + + deleteDeployments(sriovDeploy4OneName, RDSCoreConfig.WlkdSRIOV4NS) + deleteDeployments(sriovDeploy4TwoName, RDSCoreConfig.WlkdSRIOV4NS) + + By(fmt.Sprintf("Ensuring pods from %q deployment are gone", sriovDeploy4OneName)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Ensuring pods from %q deployment in %q namespace are gone", + sriovDeploy4OneName, RDSCoreConfig.WlkdSRIOV4NS) + + Eventually(func() bool { + oldPods, _ := pod.List(APIClient, RDSCoreConfig.WlkdSRIOV3NS, + metav1.ListOptions{LabelSelector: sriovDeploy4OneLabel}) + + return len(oldPods) == 0 + + }).WithContext(ctx).WithPolling(3*time.Second).WithTimeout(6*time.Minute).Should(BeTrue(), + "pods matching label() still present") + + By(fmt.Sprintf("Ensuring pods from %q deployment are gone", sriovDeploy4TwoName)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Ensuring pods from %q deployment in %q namespace are gone", + sriovDeploy4TwoName, RDSCoreConfig.WlkdSRIOV4NS) + + Eventually(func() bool { + oldPods, _ := pod.List(APIClient, RDSCoreConfig.WlkdSRIOV3NS, + metav1.ListOptions{LabelSelector: sriovDeploy4TwoLabel}) + + return len(oldPods) == 0 + + }).WithContext(ctx).WithPolling(3*time.Second).WithTimeout(6*time.Minute).Should(BeTrue(), + "pods matching label() still present") + + By("Removing ConfigMap") + + deleteConfigMap(sriovDeploy4CMName, RDSCoreConfig.WlkdSRIOV4NS) + + By("Creating ConfigMap") + + createConfigMap(sriovDeploy4CMName, + RDSCoreConfig.WlkdSRIOV4NS, RDSCoreConfig.WlkdSRIOVConfigMapData4) + + By("Removing ServiceAccount") + + deleteServiceAccount(sriovDeploy4SAName, RDSCoreConfig.WlkdSRIOV4NS) + + By("Creating ServiceAccount") + + createServiceAccount(sriovDeploy4SAName, RDSCoreConfig.WlkdSRIOV4NS) + + By("Removing Cluster RBAC") + + deleteClusterRBAC(sriovDeployRBACName4) + + By("Creating Cluster RBAC") + + createClusterRBAC(sriovDeployRBACName4, sriovRBACRole4, + sriovDeploy4SAName, RDSCoreConfig.WlkdSRIOV4NS) + + By("Defining container configuration") + + deployContainer := defineContainer(sriovContainerOneName, RDSCoreConfig.WlkdSRIOVDeploy4Image, + RDSCoreConfig.WlkdSRIOVDeploy4OneCmd, RDSCoreConfig.WldkSRIOVDeploy4OneResRequests, + RDSCoreConfig.WldkSRIOVDeploy4OneResLimits) + + deployContainerTwo := defineContainer(sriovContainerTwoName, RDSCoreConfig.WlkdSRIOVDeploy4Image, + RDSCoreConfig.WlkdSRIOVDeploy4TwoCmd, RDSCoreConfig.WldkSRIOVDeploy4TwoResRequests, + RDSCoreConfig.WldkSRIOVDeploy4TwoResLimits) + + By("Obtaining container definition") + + deployContainerCfg, err := deployContainer.GetContainerCfg() + Expect(err).ToNot(HaveOccurred(), "Failed to get container definition") + + deployContainerTwoCfg, err := deployContainerTwo.GetContainerCfg() + Expect(err).ToNot(HaveOccurred(), "Failed to get container definition") + + By("Defining 1st deployment configuration") + + deployOneLabels := map[string]string{ + strings.Split(sriovDeploy4OneLabel, "=")[0]: strings.Split(sriovDeploy4OneLabel, "=")[1]} + + deploy := defineDeployment(deployContainerCfg, + sriovDeploy4OneName, + RDSCoreConfig.WlkdSRIOV4NS, + RDSCoreConfig.WlkdSRIOVNetOne, + sriovDeploy4CMName, + sriovDeploy4SAName, + deployOneLabels, + RDSCoreConfig.WlkdSRIOVDeploy4OneSelector) + + By("Creating deployment one") + + deploy, err = deploy.CreateAndWaitUntilReady(5 * time.Minute) + Expect(err).ToNot(HaveOccurred(), + fmt.Sprintf("Failed to create deployment %s: %v", sriovDeploy4OneName, err)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Deployment %q created in %q namespace", + deploy.Definition.Name, deploy.Definition.Namespace) + + By("Defining 2nd deployment") + + deployTwoLabels := map[string]string{ + strings.Split(sriovDeploy4TwoLabel, "=")[0]: strings.Split(sriovDeploy4TwoLabel, "=")[1]} + + deployTwo := defineDeployment(deployContainerTwoCfg, + sriovDeploy4TwoName, + RDSCoreConfig.WlkdSRIOV4NS, + RDSCoreConfig.WlkdSRIOVNetTwo, + sriovDeploy4CMName, + sriovDeploy4SAName, + deployTwoLabels, + RDSCoreConfig.WlkdSRIOVDeploy4TwoSelector) + + By("Creating 2nd deployment") + + deployTwo, err = deployTwo.CreateAndWaitUntilReady(5 * time.Minute) + Expect(err).ToNot(HaveOccurred(), + fmt.Sprintf("Failed to create deployment %s: %v", sriovDeploy4TwoName, err)) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Deployment %q created in %q namespace", + deployTwo.Definition.Name, deployTwo.Definition.Namespace) + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Verify connectivity between SR-IOV workloads on the same node") + + addressesList := []string{RDSCoreConfig.WlkdSRIOVDeploy4OneTargetAddress, + RDSCoreConfig.WlkdSRIOVDeploy4OneTargetAddressIPv6} + + for _, targetAddress := range addressesList { + if targetAddress == "" { + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Skipping empty address %q", targetAddress) + + continue + } + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Access workload via %q", targetAddress) + + verifySRIOVConnectivity( + RDSCoreConfig.WlkdSRIOV4NS, + RDSCoreConfig.WlkdSRIOV4NS, + sriovDeploy4OneLabel, + sriovDeploy4TwoLabel, + targetAddress) + } + + addressesList = []string{RDSCoreConfig.WlkdSRIOVDeploy4TwoTargetAddress, + RDSCoreConfig.WlkdSRIOVDeploy4TwoTargetAddressIPv6} + + for _, targetAddress := range addressesList { + if targetAddress == "" { + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Skipping empty address %q", targetAddress) + + continue + } + + glog.V(rdscoreparams.RDSCoreLogLevel).Infof("Access workload via %q", targetAddress) + + verifySRIOVConnectivity( + RDSCoreConfig.WlkdSRIOV4NS, + RDSCoreConfig.WlkdSRIOV4NS, + sriovDeploy4TwoLabel, + sriovDeploy4OneLabel, + targetAddress) + } +} + // VerifySRIOVSuite container that contains tests for SR-IOV verification. func VerifySRIOVSuite() { Describe( diff --git a/tests/system-tests/rdscore/internal/rdscoreconfig/config.go b/tests/system-tests/rdscore/internal/rdscoreconfig/config.go index 1d293f344..4dfaee0a4 100644 --- a/tests/system-tests/rdscore/internal/rdscoreconfig/config.go +++ b/tests/system-tests/rdscore/internal/rdscoreconfig/config.go @@ -144,6 +144,8 @@ type CoreConfig struct { PolicyNS string `yaml:"rdscore_policy_ns" envconfig:"ECO_RDSCORE_POLICY_NS"` WlkdSRIOVOneNS string `yaml:"rdscore_wlkd_sriov_one_ns" envconfig:"ECO_RDSCORE_WLKD_SRIOV_ONE_NS"` WlkdSRIOVTwoNS string `yaml:"rdscore_wlkd_sriov_two_ns" envconfig:"ECO_RDSCORE_WLKD_SRIOV_TWO_NS"` + WlkdSRIOV3NS string `yaml:"rdscore_wlkd_sriov_3_ns" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_NS"` + WlkdSRIOV4NS string `yaml:"rdscore_wlkd_sriov_4_ns" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_NS"` WlkdNROPOneNS string `yaml:"rdscore_wlkd_nrop_one_ns" envconfig:"ECO_RDSCORE_WLKD_NROP_ONE_NS"` WlkdNROPTwoNS string `yaml:"rdscore_wlkd_nrop_two_ns" envconfig:"ECO_RDSCORE_WLKD_NROP_TWO_NS"` MCVlanNSOne string `yaml:"rdscore_mcvlan_ns_one" envconfig:"ECO_RDSCORE_MCVLAN_NS_ONE"` @@ -162,6 +164,8 @@ type CoreConfig struct { NodesCredentialsMap NodesBMCMap `yaml:"rdscore_nodes_bmc_map" envconfig:"ECO_RDSCORE_NODES_CREDENTIALS_MAP"` WlkdSRIOVDeployOneImage string `yaml:"rdscore_wlkd_sriov_one_image" envconfig:"ECO_RDSCORE_WLKD_SRIOV_ONE_IMG"` WlkdSRIOVDeployTwoImage string `yaml:"rdscore_wlkd_sriov_two_image" envconfig:"ECO_RDSCORE_WLKD_SRIOV_TWO_IMG"` + WlkdSRIOVDeploy3Image string `yaml:"rdscore_wlkd_sriov_3_image" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_IMG"` + WlkdSRIOVDeploy4Image string `yaml:"rdscore_wlkd_sriov_4_image" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_IMG"` WlkdNROPDeployOneImage string `yaml:"rdscore_wlkd_nrop_one_image" envconfig:"ECO_RDSCORE_WLKD_NROP_ONE_IMG"` WlkdNROPDeployTwoImage string `yaml:"rdscore_wlkd_nrop_two_image" envconfig:"ECO_RDSCORE_WLKD_NROP_TWO_IMG"` WlkdSRIOVNetOne string `yaml:"rdscore_wlkd_sriov_net_one" envconfig:"ECO_RDSCORE_WLKD_SRIOV_NET_ONE"` @@ -172,6 +176,8 @@ type CoreConfig struct { WlkdSRIOVConfigMapDataOne EnvMapString `yaml:"rdscore_wlkd_sriov_cm_data_one" envconfig:"ECO_RDSCORE_SRIOV_CM_DATA_ONE"` //nolint:lll WlkdSRIOVConfigMapDataTwo EnvMapString `yaml:"rdscore_wlkd_sriov_cm_data_two" envconfig:"ECO_RDSCORE_SRIOV_CM_DATA_TWO"` + WlkdSRIOVConfigMapData3 EnvMapString `yaml:"rdscore_wlkd_sriov_cm_data_3" envconfig:"ECO_RDSCORE_SRIOV_CM_DATA_3"` + WlkdSRIOVConfigMapData4 EnvMapString `yaml:"rdscore_wlkd_sriov_cm_data_4" envconfig:"ECO_RDSCORE_SRIOV_CM_DATA_4"` //nolint:lll StorageODFDeployOneSelector EnvMapString `yaml:"rdscore_wlkd_odf_one_selector" envconfig:"ECO_RDSCORE_WLKD_ODF_ONE_SELECTOR"` //nolint:lll @@ -183,17 +189,41 @@ type CoreConfig struct { //nolint:lll WlkdSRIOVDeployTwoSelector EnvMapString `yaml:"rdscore_wlkd_sriov_two_selector" envconfig:"ECO_RDSCORE_WLKD_SRIOV_TWO_SELECTOR"` //nolint:lll + WlkdSRIOVDeploy3OneSelector EnvMapString `yaml:"rdscore_wlkd_sriov_3_0_selector" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_0_SELECTOR"` + //nolint:lll + WlkdSRIOVDeploy4OneSelector EnvMapString `yaml:"rdscore_wlkd_sriov_4_0_selector" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_0_SELECTOR"` + //nolint:lll + WlkdSRIOVDeploy4TwoSelector EnvMapString `yaml:"rdscore_wlkd_sriov_4_1_selector" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_1_SELECTOR"` + //nolint:lll + WlkdSRIOVDeploy3TwoSelector EnvMapString `yaml:"rdscore_wlkd_sriov_3_1_selector" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_1_SELECTOR"` + //nolint:lll WldkNROPDeployOneResRequests EnvMapString `yaml:"rdscore_wlkd_nrop_one_res_requests" envconfig:"ECO_RDSCORE_WLKD_NROP_ONE_RES_REQUESTS"` //nolint:lll WldkSRIOVDeployOneResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_one_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_ONE_RES_REQUESTS"` //nolint:lll WldkSRIOVDeployTwoResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_two_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_TWO_RES_REQUESTS"` //nolint:lll + WldkSRIOVDeploy3OneResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_3_0_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_0_RES_REQUESTS"` + //nolint:lll + WldkSRIOVDeploy3TwoResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_3_1_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_1_RES_REQUESTS"` + //nolint:lll + WldkSRIOVDeploy4OneResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_4_0_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_0_RES_REQUESTS"` + //nolint:lll + WldkSRIOVDeploy4TwoResRequests EnvMapString `yaml:"rdscore_wlkd_sriov_4_1_res_requests" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_1_RES_REQUESTS"` + //nolint:lll WldkNROPDeployOneResLimits EnvMapString `yaml:"rdscore_wlkd_nrop_one_res_limits" envconfig:"ECO_RDSCORE_WLKD_NROP_ONE_RES_LIMITS"` //nolint:lll WldkSRIOVDeployOneResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_one_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_ONE_RES_LIMITS"` //nolint:lll WldkSRIOVDeployTwoResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_two_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_TWO_RES_LIMITS"` + //nolint:lll + WldkSRIOVDeploy3OneResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_3_0_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_0_RES_LIMITS"` + //nolint:lll + WldkSRIOVDeploy3TwoResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_3_1_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_1_RES_LIMITS"` + //nolint:lll + WldkSRIOVDeploy4OneResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_4_0_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_0_RES_LIMITS"` + //nolint:lll + WldkSRIOVDeploy4TwoResLimits EnvMapString `yaml:"rdscore_wlkd_sriov_4_1_res_limits" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_1_RES_LIMITS"` //nolint:lll,nolintlint NodeSelectorHTNodes EnvMapString `yaml:"rdscore_node_selector_ht_nodes" envconfig:"ECO_RDSCORE_NODE_SELECTOR_HT_NODES"` //nolint:lll @@ -201,10 +231,26 @@ type CoreConfig struct { //nolint:lll WlkdSRIOVDeployOneTargetAddressIPv6 string `yaml:"rdscore_wlkd_sriov_deploy_one_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_ONE_TARGET_IPV6"` //nolint:lll + WlkdSRIOVDeploy3OneTargetAddress string `yaml:"rdscore_wlkd3_sriov_deploy_one_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_3_ONE_TARGET"` + //nolint:lll + WlkdSRIOVDeploy3OneTargetAddressIPv6 string `yaml:"rdscore_wlkd3_sriov_deploy_one_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_3_ONE_TARGET_IPV6"` + //nolint:lll + WlkdSRIOVDeploy4OneTargetAddress string `yaml:"rdscore_wlkd4_sriov_deploy_one_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_4_ONE_TARGET"` + //nolint:lll + WlkdSRIOVDeploy4OneTargetAddressIPv6 string `yaml:"rdscore_wlkd4_sriov_deploy_one_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_4_ONE_TARGET_IPV6"` + //nolint:lll WlkdSRIOVDeployTwoTargetAddress string `yaml:"rdscore_wlkd_sriov_deploy_two_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_TWO_TARGET"` //nolint:lll WlkdSRIOVDeployTwoTargetAddressIPv6 string `yaml:"rdscore_wlkd_sriov_deploy_two_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_DEPLOY_TWO_TARGET_IPV6"` //nolint:lll + WlkdSRIOVDeploy3TwoTargetAddress string `yaml:"rdscore_wlkd3_sriov_deploy_two_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD_3_DEPLOY_TWO_TARGET"` + //nolint:lll + WlkdSRIOVDeploy3TwoTargetAddressIPv6 string `yaml:"rdscore_wlkd3_sriov_deploy_two_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_3_DEPLOY_TWO_TARGET_IPV6"` + //nolint:lll + WlkdSRIOVDeploy4TwoTargetAddress string `yaml:"rdscore_wlkd4_sriov_deploy_two_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD_4_DEPLOY_TWO_TARGET"` + //nolint:lll + WlkdSRIOVDeploy4TwoTargetAddressIPv6 string `yaml:"rdscore_wlkd4_sriov_deploy_two_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD_4_DEPLOY_TWO_TARGET_IPV6"` + //nolint:lll WlkdSRIOVDeploy2OneTargetAddress string `yaml:"rdscore_wlkd2_sriov_deploy_one_target" envconfig:"ECO_RDSCORE_SRIOV_WLKD2_DEPLOY_ONE_TARGET"` //nolint:lll WlkdSRIOVDeploy2OneTargetAddressIPv6 string `yaml:"rdscore_wlkd2_sriov_deploy_one_target_ipv6" envconfig:"ECO_RDSCORE_SRIOV_WLKD2_DEPLOY_ONE_TARGET_IPV6"` @@ -243,6 +289,14 @@ type CoreConfig struct { //nolint:lll,nolintlint WlkdSRIOVDeploy2TwoCmd EnvSliceString `yaml:"rdscore_wlkd2_sriov_two_cmd" envconfig:"ECO_RDSCORE_WLKD_SRIOV_2_TWO_CMD"` //nolint:lll,nolintlint + WlkdSRIOVDeploy3OneCmd EnvSliceString `yaml:"rdscore_wlkd3_sriov_one_cmd" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_ONE_CMD"` + //nolint:lll,nolintlint + WlkdSRIOVDeploy3TwoCmd EnvSliceString `yaml:"rdscore_wlkd3_sriov_two_cmd" envconfig:"ECO_RDSCORE_WLKD_SRIOV_3_TWO_CMD"` + //nolint:lll,nolintlint + WlkdSRIOVDeploy4OneCmd EnvSliceString `yaml:"rdscore_wlkd4_sriov_one_cmd" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_ONE_CMD"` + //nolint:lll,nolintlint + WlkdSRIOVDeploy4TwoCmd EnvSliceString `yaml:"rdscore_wlkd4_sriov_two_cmd" envconfig:"ECO_RDSCORE_WLKD_SRIOV_4_TWO_CMD"` + //nolint:lll,nolintlint MCVlanDeplonOneCMD EnvSliceString `yaml:"rdscore_mcvlan_deploy_1_cmd" envconfig:"ECO_SYSTEM_RDSCORE_MCVLAN_DEPLOY_1_CMD"` //nolint:lll,nolintlint MCVlanDeplonTwoCMD EnvSliceString `yaml:"rdscore_mcvlan_deploy_2_cmd" envconfig:"ECO_SYSTEM_RDSCORE_MCVLAN_DEPLOY_2_CMD"` diff --git a/tests/system-tests/rdscore/internal/rdscoreconfig/default.yaml b/tests/system-tests/rdscore/internal/rdscoreconfig/default.yaml index 4294181a2..a3368baae 100644 --- a/tests/system-tests/rdscore/internal/rdscoreconfig/default.yaml +++ b/tests/system-tests/rdscore/internal/rdscoreconfig/default.yaml @@ -8,12 +8,20 @@ rdscore_wlkd_odf_one_selector: {} rdscore_wlkd_odf_two_selector: {} rdscore_wlkd_sriov_one_image: "" rdscore_wlkd_sriov_two_image: "" +rdscore_wlkd_sriov_3_image: "" +rdscore_wlkd_sriov_4_image: "" rdscore_wlkd_sriov_one_cmd: [] rdscore_wlkd_sriov_two_cmd: [] rdscore_wlkd2_sriov_one_cmd: [] rdscore_wlkd2_sriov_two_cmd: [] +rdscore_wlkd3_sriov_one_cmd: [] +rdscore_wlkd3_sriov_two_cmd: [] +rdscore_wlkd4_sriov_one_cmd: [] +rdscore_wlkd4_sriov_two_cmd: [] rdscore_wlkd_sriov_cm_data_one: {} rdscore_wlkd_sriov_cm_data_two: {} +rdscore_wlkd_sriov_cm_data_3: {} +rdscore_wlkd_sriov_cm_data_4: {} rdscore_wlkd_sriov_deploy_one_target: "" rdscore_wlkd_sriov_deploy_one_target_ipv6: "" rdscore_wlkd_sriov_deploy_two_target: "" @@ -22,15 +30,35 @@ rdscore_wlkd2_sriov_deploy_one_target: "" rdscore_wlkd2_sriov_deploy_one_target_ipv6: "" rdscore_wlkd2_sriov_deploy_two_target: "" rdscore_wlkd2_sriov_deploy_two_target_ipv6: "" +rdscore_wlkd3_sriov_deploy_one_target: "" +rdscore_wlkd3_sriov_deploy_one_target_ipv6: "" +rdscore_wlkd3_sriov_deploy_two_target: "" +rdscore_wlkd3_sriov_deploy_two_target_ipv6: "" +rdscore_wlkd4_sriov_deploy_one_target: "" +rdscore_wlkd4_sriov_deploy_one_target_ipv6: "" +rdscore_wlkd4_sriov_deploy_two_target: "" +rdscore_wlkd4_sriov_deploy_two_target_ipv6: "" rdscore_wlkd_sriov_one_selector: {} rdscore_wlkd_sriov_two_selector: {} +rdscore_wlkd_sriov_3_0_selector: {} +rdscore_wlkd_sriov_3_1_selector: {} +rdscore_wlkd_sriov_4_0_selector: {} +rdscore_wlkd_sriov_4_1_selector: {} rdscore_wlkd_sriov_one_res_requests: {} rdscore_wlkd_sriov_two_res_requests: {} +rdscore_wlkd_sriov_3_0_res_requests: {} +rdscore_wlkd_sriov_3_1_res_requests: {} rdscore_wlkd_sriov_one_res_limits: {} rdscore_wlkd_sriov_two_res_limits: {} +rdscore_wlkd_sriov_3_0_res_limits: {} +rdscore_wlkd_sriov_3_1_res_limits: {} +rdscore_wlkd_sriov_4_0_res_limits: {} +rdscore_wlkd_sriov_4_1_res_limits: {} rdscore_wlkd_sriov_two_sa: rdscore-telco-sa-two rdscore_wlkd_sriov_one_ns: rds-sriov-wlkd rdscore_wlkd_sriov_two_ns: rds-sriov-wlkd +rdscore_wlkd_sriov_3_ns: rds-sriov-wlkd +rdscore_wlkd_sriov_4_ns: rds-sriov-wlkd rdscore_wlkd_sriov_net_one: sriov-net-one rdscore_wlkd_sriov_net_two: sriov-net-two rdscore_tolerations_list: [] diff --git a/tests/system-tests/rdscore/tests/00_validate_top_level.go b/tests/system-tests/rdscore/tests/00_validate_top_level.go index a58e1c455..075001115 100644 --- a/tests/system-tests/rdscore/tests/00_validate_top_level.go +++ b/tests/system-tests/rdscore/tests/00_validate_top_level.go @@ -25,6 +25,16 @@ var _ = Describe( ContinueOnFailure, Label("rds-core-workflow"), func() { Context("Configured Cluster", Label("clean-cluster"), func() { + It("Verifies SR-IOV workloads on same node and different networks", + Label("sriov", "sriov-same-node-different-nets"), + reportxml.ID("72258"), MustPassRepeatedly(3), + rdscorecommon.VerifySRIOVWorkloadsOnSameNodeDifferentNet) + + It("Verifies SR-IOV workloads on different nodes and different networks", + Label("sriov", "sriov-different-nodes-different-nets"), + reportxml.ID("72259"), MustPassRepeatedly(3), + rdscorecommon.VerifySRIOVWorkloadsOnDifferentNodesDifferentNet) + It("Verifies NUMA-aware workload is deployable", reportxml.ID("73677"), Label("nrop"), rdscorecommon.VerifyNROPWorkload)