Add diagnostics to check for not ready endpoints

pull/6/head
Satnam Singh 2015-06-17 17:49:49 -07:00
parent 8af4fbfd1b
commit 67e4cf336a
1 changed files with 13 additions and 0 deletions

View File

@ -240,6 +240,19 @@ func ClusterLevelLoggingWithElasticsearch(f *Framework) {
missing := 0
expected := nodeCount * countTo
for start := time.Now(); time.Since(start) < graceTime; time.Sleep(10 * time.Second) {
// Debugging code to report the status of the elasticsearch logging endpoints.
esPods, err := f.Client.Pods(api.NamespaceDefault).List(labels.Set{"k8s-app": "elasticsearch-logging"}.AsSelector(), fields.Everything())
if err != nil {
Logf("Attempt to list Elasticsearch nodes encountered a problem -- may retry: %v", err)
continue
} else {
for i, pod := range esPods.Items {
Logf("pod %d: %s PodIP %s phase %s condition %+v", i, pod.Name, pod.Status.PodIP, pod.Status.Phase,
pod.Status.Conditions)
}
}
// Ask Elasticsearch to return all the log lines that were tagged with the underscore
// verison of the name. Ask for twice as many log lines as we expect to check for
// duplication bugs.