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

e2e: topology manager: avoid sriov device plugin pod leak on test failures #95592

Merged
merged 2 commits into from Oct 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/e2e_node/topology_manager_test.go
Expand Up @@ -506,7 +506,7 @@ func teardownSRIOVConfigOrFail(f *framework.Framework, sd *sriovData) {
GracePeriodSeconds: &gp,
}

ginkgo.By("Delete SRIOV device plugin pod %s/%s")
ginkgo.By(fmt.Sprintf("Delete SRIOV device plugin pod %s/%s", sd.pod.Namespace, sd.pod.Name))
err = f.ClientSet.CoreV1().Pods(sd.pod.Namespace).Delete(context.TODO(), sd.pod.Name, deleteOptions)
framework.ExpectNoError(err)
waitForContainerRemoval(sd.pod.Spec.Containers[0].Name, sd.pod.Name, sd.pod.Namespace)
Expand All @@ -527,6 +527,8 @@ func runTopologyManagerNodeAlignmentSuiteTests(f *framework.Framework, configMap
}

sd := setupSRIOVConfigOrFail(f, configMap)
defer teardownSRIOVConfigOrFail(f, sd)

envInfo := &testEnvInfo{
numaNodes: numaNodes,
sriovResourceName: sd.resourceName,
Expand Down Expand Up @@ -695,7 +697,6 @@ func runTopologyManagerNodeAlignmentSuiteTests(f *framework.Framework, configMap
}
runTopologyManagerNegativeTest(f, 1, ctnAttrs, envInfo)
}
teardownSRIOVConfigOrFail(f, sd)
}

func runTopologyManagerTests(f *framework.Framework) {
Expand Down