Skip to content

Commit

Permalink
Merge pull request #313 from mmirecki/tuning-fix
Browse files Browse the repository at this point in the history
Update sysctl to a safe one in metapluging chaining test
  • Loading branch information
SchSeba authored Jun 6, 2022
2 parents 23d3a97 + 0a4c675 commit c1a3c92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/conformance/tests/sriov_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ var _ = Describe("[sriov] operator", func() {
It("Should be able to configure a metaplugin", func() {
ipam := `{"type": "host-local","ranges": [[{"subnet": "1.1.1.0/24"}]],"dataDir": "/run/my-orchestrator/container-ipam-state"}`
config := func(network *sriovv1.SriovNetwork) {
network.Spec.MetaPluginsConfig = `{ "type": "tuning", "sysctl": { "net.core.somaxconn": "500"}}`
network.Spec.MetaPluginsConfig = `{ "type": "tuning", "sysctl": { "net.ipv4.conf.IFNAME.accept_redirects": "1"}}`
}
err := network.CreateSriovNetwork(clients, sriovDevice, sriovNetworkName, namespaces.Test, operatorNamespace, resourceName, ipam, []network.SriovNetworkOptions{config}...)
Expect(err).ToNot(HaveOccurred())
Expand All @@ -819,10 +819,10 @@ var _ = Describe("[sriov] operator", func() {
}, (10+snoTimeoutMultiplier*110)*time.Second, 1*time.Second).ShouldNot(HaveOccurred())

testPod := createTestPod(node, []string{sriovNetworkName})
stdout, _, err := pod.ExecCommand(clients, testPod, "more", "/proc/sys/net/core/somaxconn")
stdout, _, err := pod.ExecCommand(clients, testPod, "more", "/proc/sys/net/ipv4/conf/net1/accept_redirects")
Expect(err).ToNot(HaveOccurred())

Expect(strings.TrimSpace(stdout)).To(Equal("500"))
Expect(strings.TrimSpace(stdout)).To(Equal("1"))
})
})

Expand Down

0 comments on commit c1a3c92

Please sign in to comment.