mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-25 19:43:22 +00:00
Merge pull request #129049 from npinaeva/curl-timeout
[e2e, service] Add total timeout for affinity check curl command.
This commit is contained in:
commit
d4bfa1e059
@ -142,7 +142,7 @@ func affinityCheckFromPod(execPod *v1.Pod, serviceIP string, servicePort int) (t
|
|||||||
interval := 2 * AffinityConfirmCount * time.Second
|
interval := 2 * AffinityConfirmCount * time.Second
|
||||||
|
|
||||||
serviceIPPort := net.JoinHostPort(serviceIP, strconv.Itoa(servicePort))
|
serviceIPPort := net.JoinHostPort(serviceIP, strconv.Itoa(servicePort))
|
||||||
curl := fmt.Sprintf(`curl -q -s --connect-timeout 2 http://%s/`, serviceIPPort)
|
curl := fmt.Sprintf(`curl -q -s --connect-timeout 2 --max-time 60 http://%s/`, serviceIPPort)
|
||||||
cmd := fmt.Sprintf("for i in $(seq 0 %d); do echo; %s ; done", AffinityConfirmCount, curl)
|
cmd := fmt.Sprintf("for i in $(seq 0 %d); do echo; %s ; done", AffinityConfirmCount, curl)
|
||||||
getHosts := func() []string {
|
getHosts := func() []string {
|
||||||
stdout, err := e2eoutput.RunHostCmd(execPod.Namespace, execPod.Name, cmd)
|
stdout, err := e2eoutput.RunHostCmd(execPod.Namespace, execPod.Name, cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user