Merge pull request #96640 from aojea/kubenetsctp

e2e SCTP test must not depend on kubenet
This commit is contained in:
Kubernetes Prow Robot 2020-11-17 21:10:05 -08:00 committed by GitHub
commit bd2f96d10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3799,18 +3799,10 @@ var _ = SIGDescribe("SCTP [Feature:SCTP] [LinuxOnly]", func() {
}) })
ginkgo.It("should create a Pod with SCTP HostPort", func() { ginkgo.It("should create a Pod with SCTP HostPort", func() {
ginkgo.By("checking whether kubenet is used")
node, err := e2enode.GetRandomReadySchedulableNode(cs) node, err := e2enode.GetRandomReadySchedulableNode(cs)
framework.ExpectNoError(err) framework.ExpectNoError(err)
hostExec := utils.NewHostExec(f) hostExec := utils.NewHostExec(f)
defer hostExec.Cleanup() defer hostExec.Cleanup()
cmd := "ps -C kubelet -o cmd= | grep kubenet"
framework.Logf("Executing cmd %q on node %v", cmd, node.Name)
err = hostExec.IssueCommand(cmd, node)
if err != nil {
e2eskipper.Skipf("Interrogation of kubenet usage failed on node %s", node.Name)
}
framework.Logf("kubenet is in use")
ginkgo.By("getting the state of the sctp module on the selected node") ginkgo.By("getting the state of the sctp module on the selected node")
nodes := &v1.NodeList{} nodes := &v1.NodeList{}
@ -3829,7 +3821,7 @@ var _ = SIGDescribe("SCTP [Feature:SCTP] [LinuxOnly]", func() {
framework.ExpectNoError(err, "failed to delete pod: %s in namespace: %s", podName, f.Namespace.Name) framework.ExpectNoError(err, "failed to delete pod: %s in namespace: %s", podName, f.Namespace.Name)
}() }()
// wait until host port manager syncs rules // wait until host port manager syncs rules
cmd = "iptables-save" cmd := "iptables-save"
if framework.TestContext.ClusterIsIPv6() { if framework.TestContext.ClusterIsIPv6() {
cmd = "ip6tables-save" cmd = "ip6tables-save"
} }