mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
e2e TCP Close-wait don't set conn deadline
Don't set a connection deadline for reading, because the read operation will fail if no data is reaceived after the deadline, and will not keep the connection in the close_wait status.
This commit is contained in:
parent
4b423ad073
commit
6efe6e1284
@ -44,10 +44,9 @@ var kubeProxyE2eImage = imageutils.GetE2EImage(imageutils.Agnhost)
|
||||
|
||||
var _ = SIGDescribe("Network", func() {
|
||||
const (
|
||||
testDaemonHTTPPort = 11301
|
||||
testDaemonTCPPort = 11302
|
||||
deadlineTimeoutSeconds = 5
|
||||
postFinTimeoutSeconds = 15
|
||||
testDaemonHTTPPort = 11301
|
||||
testDaemonTCPPort = 11302
|
||||
postFinTimeoutSeconds = 30
|
||||
)
|
||||
|
||||
fr := framework.NewDefaultFramework("network")
|
||||
@ -157,7 +156,7 @@ var _ = SIGDescribe("Network", func() {
|
||||
fmt.Sprintf(`{"RemoteAddr":"%v", "PostFinTimeoutSeconds":%v, "TimeoutSeconds":%v, "LeakConnection":true}`,
|
||||
net.JoinHostPort(serverNodeInfo.nodeIP, strconv.Itoa(testDaemonTCPPort)),
|
||||
postFinTimeoutSeconds,
|
||||
deadlineTimeoutSeconds),
|
||||
0),
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -232,7 +231,7 @@ var _ = SIGDescribe("Network", func() {
|
||||
cmd := fmt.Sprintf("cat /rootfs/proc/net/nf_conntrack "+
|
||||
"| grep -m 1 'CLOSE_WAIT.*dst=%v.*dport=%v' ",
|
||||
ip, testDaemonTCPPort)
|
||||
if err := wait.PollImmediate(deadlineTimeoutSeconds, postFinTimeoutSeconds, func() (bool, error) {
|
||||
if err := wait.PollImmediate(1*time.Second, postFinTimeoutSeconds, func() (bool, error) {
|
||||
result, err := framework.RunHostCmd(fr.Namespace.Name, "e2e-net-exec", cmd)
|
||||
// retry if we can't obtain the conntrack entry
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user