Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system-test: verify SR-IOV post cluster reboot #77

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,53 @@ func VerifySRIOVConnectivityOnSameNode(ctx SpecContext) {
}
}

// VerifySRIOVConnectivityOnSameNodeAndDifferentNets verifies connectivity between workloads
// scheduled on the same node and on different SR-IOV networks.
func VerifySRIOVConnectivityOnSameNodeAndDifferentNets() {
glog.V(rdscoreparams.RDSCoreLogLevel).Infof(
"Verify connectivity between SR-IOV workloads on the same node and different SR-IOV networks")

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)
}
}

// VerifySRIOVWorkloadsOnSameNodeDifferentNet deploy worklods with different SRIOV networks on the same node
//
//nolint:funlen
Expand Down Expand Up @@ -1141,6 +1188,53 @@ func VerifySRIOVWorkloadsOnSameNodeDifferentNet(ctx SpecContext) {
}
}

// VerifySRIOVConnectivityOnDifferentNodesAndDifferentNetworks verifies connectivity between workloads
// running on different SR-IOV networks and different nodes.
func VerifySRIOVConnectivityOnDifferentNodesAndDifferentNetworks() {
glog.V(rdscoreparams.RDSCoreLogLevel).Infof(
"Verify connectivity between SR-IOV workloads on different nodes and different SR-IOV networks")

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)
}
}

// VerifySRIOVWorkloadsOnDifferentNodesDifferentNet deploy worklods with different SRIOV networks on different nodes
//
//nolint:funlen
Expand Down
28 changes: 28 additions & 0 deletions tests/system-tests/rdscore/tests/00_validate_top_level.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ var _ = Describe(

By("Creating NUMA aware workload")
rdscorecommon.VerifyNROPWorkload(ctx)

By("Creating SR-IOV workload on same node and different SR-IOV networks")
rdscorecommon.VerifySRIOVWorkloadsOnSameNodeDifferentNet(ctx)

By("Creating SR-IOV workload on different nodes and different SR-IOV networks")
rdscorecommon.VerifySRIOVWorkloadsOnDifferentNodesDifferentNet(ctx)
})

It("Verifies ungraceful cluster reboot",
Expand Down Expand Up @@ -211,6 +217,14 @@ var _ = Describe(
Label("sriov", "verify-sriov-same-node"), reportxml.ID("71951"),
rdscorecommon.VerifySRIOVConnectivityOnSameNode)

It("Verifies SR-IOV workloads on the same node and different SR-IOV nets post reboot",
Label("sriov", "verify-sriov-same-node-diff-nets"), reportxml.ID("72264"),
rdscorecommon.VerifySRIOVConnectivityOnSameNodeAndDifferentNets)

It("Verifies SR-IOV workloads on different nodes and different SR-IOV nets post reboot",
Label("sriov", "verify-sriov-diff-nodes-diff-nets"), reportxml.ID("72265"),
rdscorecommon.VerifySRIOVConnectivityOnSameNodeAndDifferentNets)

It("Verifies MACVLAN workloads on the same node post hard reboot",
Label("macvlan", "verify-macvlan-same-node"), reportxml.ID("72569"),
rdscorecommon.VerifyMACVLANConnectivityOnSameNode)
Expand Down Expand Up @@ -242,6 +256,12 @@ var _ = Describe(

By("Creating NUMA aware workload")
rdscorecommon.VerifyNROPWorkload(ctx)

By("Creating SR-IOV workload on same node and different SR-IOV networks")
rdscorecommon.VerifySRIOVWorkloadsOnSameNodeDifferentNet(ctx)

By("Creating SR-IOV workload on different nodes and different SR-IOV networks")
rdscorecommon.VerifySRIOVWorkloadsOnDifferentNodesDifferentNet(ctx)
})

It("Verifies graceful cluster reboot",
Expand Down Expand Up @@ -313,6 +333,14 @@ var _ = Describe(
Label("sriov", "deploy-sriov-different-node"), reportxml.ID("72049"), MustPassRepeatedly(3),
rdscorecommon.VerifySRIOVWorkloadsOnDifferentNodes)

It("Verifies SR-IOV workloads on the same node and different SR-IOV nets after graceful reboot",
Label("sriov", "verify-sriov-same-node-diff-nets"), reportxml.ID("72260"),
rdscorecommon.VerifySRIOVConnectivityOnSameNodeAndDifferentNets)

It("Verifies SR-IOV workloads on different nodes and different SR-IOV nets after graceful reboot",
Label("sriov", "verify-sriov-diff-nodes-diff-nets"), reportxml.ID("72261"),
rdscorecommon.VerifySRIOVConnectivityOnSameNodeAndDifferentNets)

It("Verifies MACVLAN workloads on the same node post soft reboot",
Label("macvlan", "verify-macvlan-same-node"), reportxml.ID("72571"),
rdscorecommon.VerifyMACVLANConnectivityOnSameNode)
Expand Down
Loading