From 2eafc562fa7abe707dc33a567c80692be9d6a0d0 Mon Sep 17 00:00:00 2001 From: Shyam Jeedigunta Date: Tue, 8 Aug 2017 14:09:15 +0200 Subject: [PATCH] Block on master-creation step for large clusters (>50 nodes) in kube-up --- cluster/gce/util.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index c430cb6d2a1..4ff33a801aa 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -953,6 +953,7 @@ function delete-subnetworks() { # # Assumed vars: # KUBE_TEMP: temporary directory +# NUM_NODES: #nodes in the cluster # # Args: # $1: host name @@ -1044,7 +1045,13 @@ function create-master() { create-certs "${MASTER_RESERVED_IP}" create-etcd-certs ${MASTER_NAME} - create-master-instance "${MASTER_RESERVED_IP}" & + if [[ "${NUM_NODES}" -ge "50" ]]; then + # We block on master creation for large clusters to avoid doing too much + # unnecessary work in case master start-up fails (like creation of nodes). + create-master-instance "${MASTER_RESERVED_IP}" + else + create-master-instance "${MASTER_RESERVED_IP}" & + fi } # Adds master replica to etcd cluster.