Commit 3ac9769d authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #26163 from sttts/sttts-flake-21484-pod-log

Automatic merge from submit-queue Flake 21484: retrieve pod log during e2e error Print the pod log when an error occurs in > Proxy version 1 should proxy through a service and a pod [Conformance] e2e test. This will help to understand flake https://github.com/kubernetes/kubernetes/issues/21484 better.
parents d08b14ef eea7ed21
......@@ -243,6 +243,13 @@ func proxyContext(version string) {
wg.Wait()
if len(errors) != 0 {
body, err := f.Client.Pods(f.Namespace.Name).GetLogs(pods[0].Name, &api.PodLogOptions{}).Do().Raw()
if err != nil {
framework.Logf("Error getting logs for pod %s: %v", pods[0].Name, err)
} else {
framework.Logf("Pod %s has the following error logs: %s", pods[0].Name, body)
}
Fail(strings.Join(errors, "\n"))
}
})
......
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