Commit 0f8869d3 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31516 from sttts/sttts-e2e-CheckConnectivityToHost-logs

Automatic merge from submit-queue e2e: log wget output on CheckConnectivityToHost error Log output might help to diagnose e2e flakes, whether they are caused by dns issues or connection timeouts. Might help with flake https://github.com/kubernetes/kubernetes/issues/28188.
parents be848f2a 3262b7fc
......@@ -4689,7 +4689,18 @@ func CheckConnectivityToHost(f *Framework, nodeName, podName, host string, timeo
return err
}
defer podClient.Delete(podName, nil)
return WaitForPodSuccessInNamespace(f.Client, podName, contName, f.Namespace.Name)
err = WaitForPodSuccessInNamespace(f.Client, podName, contName, f.Namespace.Name)
if err != nil {
logs, logErr := GetPodLogs(f.Client, f.Namespace.Name, pod.Name, contName)
if logErr != nil {
Logf("Warning: Failed to get logs from pod %q: %v", pod.Name, logErr)
} else {
Logf("pod %s/%s \"wget\" logs:\n%s", f.Namespace.Name, pod.Name, logs)
}
}
return err
}
// CoreDump SSHs to the master and all nodes and dumps their logs into dir.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment