From bab7a255b7809b35dd90bf11f2999876b66792cb Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Fri, 17 Jun 2016 10:04:39 -0400 Subject: [PATCH] kube-up multizone: don't print scary warning The node-count check gets confused when there are more nodes that we launched, which is normal with KUBE_USE_EXISTING_MASTER. This fix just suppresses the error message in that case. Fix #23390 --- cluster/validate-cluster.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cluster/validate-cluster.sh b/cluster/validate-cluster.sh index a253bdb6dee..2f420d29cf0 100755 --- a/cluster/validate-cluster.sh +++ b/cluster/validate-cluster.sh @@ -79,7 +79,9 @@ while true; do if (( "${found}" == "${EXPECTED_NUM_NODES}" )) && (( "${ready}" == "${EXPECTED_NUM_NODES}")); then break elif (( "${found}" > "${EXPECTED_NUM_NODES}" )); then - echo -e "${color_red}Found ${found} nodes, but expected ${EXPECTED_NUM_NODES}. Your cluster may not behave correctly.${color_norm}" + if [[ "${KUBE_USE_EXISTING_MASTER:-}" != "true" ]]; then + echo -e "${color_red}Found ${found} nodes, but expected ${EXPECTED_NUM_NODES}. Your cluster may not behave correctly.${color_norm}" + fi break elif (( "${ready}" > "${EXPECTED_NUM_NODES}")); then echo -e "${color_red}Found ${ready} ready nodes, but expected ${EXPECTED_NUM_NODES}. Your cluster may not behave correctly.${color_norm}"