Commit a84e9457 authored by roberthbailey's avatar roberthbailey

Merge pull request #4252 from satnam6502/kubeup

Report more information about nodes during cluster validation
parents 301eba9d a57d4c59
...@@ -32,7 +32,8 @@ get-password ...@@ -32,7 +32,8 @@ get-password
detect-master > /dev/null detect-master > /dev/null
detect-minions > /dev/null detect-minions > /dev/null
MINIONS_FILE=/tmp/minions MINIONS_FILE=/tmp/minions-$$
trap 'rm -rf "${MINIONS_FILE}"' EXIT
# Make several attempts to deal with slow cluster birth. # Make several attempts to deal with slow cluster birth.
attempt=0 attempt=0
while true; do while true; do
...@@ -43,6 +44,7 @@ while true; do ...@@ -43,6 +44,7 @@ while true; do
else else
if (( attempt > 5 )); then if (( attempt > 5 )); then
echo -e "${color_red}Detected ${found} nodes out of ${NUM_MINIONS}. Your cluster may not be working. ${color_norm}" echo -e "${color_red}Detected ${found} nodes out of ${NUM_MINIONS}. Your cluster may not be working. ${color_norm}"
cat -n "${MINIONS_FILE}"
exit 2 exit 2
fi fi
attempt=$((attempt+1)) attempt=$((attempt+1))
...@@ -50,7 +52,7 @@ while true; do ...@@ -50,7 +52,7 @@ while true; do
fi fi
done done
echo "Found ${found} nodes." echo "Found ${found} nodes."
cat "${MINIONS_FILE}" cat -n "${MINIONS_FILE}"
# On vSphere, use minion IPs as their names # On vSphere, use minion IPs as their names
if [[ "${KUBERNETES_PROVIDER}" == "vsphere" ]] || [[ "${KUBERNETES_PROVIDER}" == "vagrant" ]]; then if [[ "${KUBERNETES_PROVIDER}" == "vsphere" ]] || [[ "${KUBERNETES_PROVIDER}" == "vagrant" ]]; then
...@@ -62,6 +64,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do ...@@ -62,6 +64,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
count=$(grep -c "${MINION_NAMES[$i]}" "${MINIONS_FILE}") || : count=$(grep -c "${MINION_NAMES[$i]}" "${MINIONS_FILE}") || :
if [[ "${count}" == "0" ]]; then if [[ "${count}" == "0" ]]; then
echo -e "${color_red}Failed to find ${MINION_NAMES[$i]}, cluster is probably broken.${color_norm}" echo -e "${color_red}Failed to find ${MINION_NAMES[$i]}, cluster is probably broken.${color_norm}"
cat -n "${MINIONS_FILE}"
exit 1 exit 1
fi fi
......
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