From adbbfbf62fae5031d74ce4f6f677f15d1c2ffdb4 Mon Sep 17 00:00:00 2001 From: Vishnu Kannan Date: Fri, 23 Jan 2015 18:26:21 +0000 Subject: [PATCH] Improve monitoring e2e test. --- hack/e2e-suite/monitoring.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hack/e2e-suite/monitoring.sh b/hack/e2e-suite/monitoring.sh index 5820ec463d9..1871b20d590 100755 --- a/hack/e2e-suite/monitoring.sh +++ b/hack/e2e-suite/monitoring.sh @@ -51,6 +51,10 @@ function setup { function cleanup { "${KUBECFG}" resize monitoring-influxGrafanaController 0 &> /dev/null || true "${KUBECFG}" resize monitoring-heapsterController 0 &> /dev/null || true + while kubectl.sh get pods -l "name=influxGrafana" -o template -t {{range.items}}{{.id}}:{{end}} | grep -c . &> /dev/null \ + || kubectl.sh get pods -l "name=heapster" -o template -t {{range.items}}{{.id}}:{{end}} | grep -c . &> /dev/null; do + sleep 2 + done "${KUBECTL}" delete -f "${MONITORING}/" &> /dev/null || true # This only has work to do on gce and gke @@ -104,6 +108,9 @@ function wait-for-pods { trap cleanup EXIT +# Remove any pre-existing monitoring services. +cleanup + # Start monitoring pods and services. setup