update validate-cluster.sh

This commit is contained in:
He Simei 2015-12-29 19:51:00 +08:00
parent 9a1d16f47d
commit abe7fc0e91

View File

@ -40,9 +40,9 @@ while true; do
# Suppress errors from kubectl output because during cluster bootstrapping
# for clusters where the master node is registered, the apiserver will become
# available and then get restarted as the kubelet configures the docker bridge.
nodes=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes) || true
found=$(($(echo "${nodes}" | wc -l) - 1)) || true
ready=$(echo "${nodes}" | grep -c "Ready") || true
node=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes) || true
found=$(($(echo "${node}" | wc -l) - 1)) || true
ready=$(echo "${node}" | grep -c "Ready") || true
if (( "${found}" == "${EXPECTED_NUM_NODES}" )) && (( "${ready}" == "${EXPECTED_NUM_NODES}")); then
break