Commit 109c3f2b authored by Tim Hockin's avatar Tim Hockin

Merge pull request #12834 from eldarion-gondor/fix-validate-cluster-on-error

When calling kubectl.sh, allow error due to API server bouncing
parents 71042e17 b1c418ea
...@@ -40,7 +40,7 @@ while true; do ...@@ -40,7 +40,7 @@ while true; do
# Suppress errors from kubectl output because during cluster bootstrapping # Suppress errors from kubectl output because during cluster bootstrapping
# for clusters where the master node is registered, the apiserver will become # for clusters where the master node is registered, the apiserver will become
# available and then get restarted as the kubelet configures the docker bridge. # available and then get restarted as the kubelet configures the docker bridge.
nodes_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o template --template='{{range .items}}{{with index .status.conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}' --api-version=v1) nodes_status=$("${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o template --template='{{range .items}}{{with index .status.conditions 0}}{{.type}}:{{.status}},{{end}}{{end}}' --api-version=v1) || true
found=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:') || true found=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:') || true
ready=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:True') || true ready=$(echo "${nodes_status}" | tr "," "\n" | grep -c 'Ready:True') || true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment