Commit 06a23ddd authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #33097 from gmarek/static-ip-creation

Automatic merge from submit-queue Wait until master IP is visible Hopefully fix #32789 (see: https://github.com/kubernetes/kubernetes/pull/33085#issuecomment-248322464) It's a pretty far-fetched, but this might fix our GCE cluster startup problems. @mikedanese @fejta @wojtek-t
parents 2750c778 f7d0615e
...@@ -411,7 +411,21 @@ function create-static-ip() { ...@@ -411,7 +411,21 @@ function create-static-ip() {
if gcloud compute addresses create "$1" \ if gcloud compute addresses create "$1" \
--project "${PROJECT}" \ --project "${PROJECT}" \
--region "${REGION}" -q > /dev/null; then --region "${REGION}" -q > /dev/null; then
# successful operation # successful operation - wait until it's visible
start="$(date +%s)"
while true; do
now="$(date +%s)"
# Timeout set to 15 minutes
if [ $((now - start)) -gt 900 ]; then
echo "Timeout while waiting for master IP visibility"
exit 2
fi
if gcloud compute addresses describe "$1" --project "${PROJECT}" --region "${REGION}" >/dev/null 2>&1; then
break
fi
echo "Master IP not visible yet. Waiting..."
sleep 5
done
break break
fi fi
......
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