From 62898319dff291843e53b7839c6cde14ee5d2aa4 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Tue, 23 Feb 2016 21:48:25 -0500 Subject: [PATCH] AWS kube-up: Increase timeout for spot instances Spot instances take a lot longer to run; wait up to 15 minutes for the nodes to launch when we're using spot instances. (Previously we were waiting 5 minutes). --- cluster/aws/util.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 7807faeb020..882858ebb6e 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1154,7 +1154,12 @@ function start-minions() { function wait-minions { # Wait for the minions to be running # TODO(justinsb): This is really not needed any more - attempt=0 + local attempt=0 + local max_attempts=30 + # Spot instances are slower to launch + if [[ -n "${NODE_SPOT_PRICE:-}" ]]; then + max_attempts=90 + fi while true; do find-running-minions > $LOG if [[ ${#NODE_IDS[@]} == ${NUM_NODES} ]]; then @@ -1162,7 +1167,7 @@ function wait-minions { break fi - if (( attempt > 30 )); then + if (( attempt > max_attempts )); then echo echo "Expected number of minions did not start in time" echo