Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break endless loop in vagrant cluster #35764

Merged
merged 1 commit into from
Nov 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions cluster/vagrant/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,14 @@ function verify-cluster {
echo "Waiting for each node to be registered with cloud provider"
for (( i=0; i<${#NODE_NAMES[@]}; i++)); do
local validated="0"
start="$(date +%s)"
until [[ "$validated" == "1" ]]; do
now="$(date +%s)"
# Timeout set to 3 minutes
if [ $((now - start)) -gt 180 ]; then
echo "Timeout while waiting for echo node to be registered with cloud provider"
exit 2
fi
local nodes=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o name --api-version=v1)
validated=$(echo $nodes | grep -c "${NODE_NAMES[i]}") || {
printf "."
Expand Down