mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
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.
This commit is contained in:
commit
3ac9769d49
@ -243,6 +243,13 @@ func proxyContext(version string) {
|
|||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
if len(errors) != 0 {
|
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"))
|
Fail(strings.Join(errors, "\n"))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user