Commit 38e6392e authored by Piotr Szczesniak's avatar Piotr Szczesniak

Added printing heapster logs in case of monitoring.go e2e failure

parent a5100ef0
......@@ -233,9 +233,24 @@ func testMonitoringUsingHeapsterInfluxdb(c *client.Client) {
return
}
if time.Since(startTime) >= testTimeout {
// temporary workaround to help debug issue #12765
printDebugInfo(c)
break
}
time.Sleep(sleepBetweenAttempts)
}
Failf("monitoring using heapster and influxdb test failed")
}
func printDebugInfo(c *client.Client) {
set := labels.Set{"k8s-app": "heapster"}
options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{set.AsSelector()}}
podList, err := c.Pods(api.NamespaceSystem).List(options)
if err != nil {
Logf("Error while listing pods %v", err)
return
}
for _, pod := range podList.Items {
Logf("Kubectl output:\n%v", runKubectlOrDie("log", pod.Name, "--namespace=kube-system"))
}
}
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