Merge pull request #27627 from justinsb/fix_23390

Automatic merge from submit-queue

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
This commit is contained in:
k8s-merge-robot 2016-06-17 11:24:29 -07:00 committed by GitHub
commit d4d6184931

View File

@ -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}"