Add more logging in case of Kubemark startup failure
This commit is contained in:
		@@ -217,7 +217,10 @@ rm "${KUBECONFIG_SECRET}"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
echo "Waiting for all HollowNodes to become Running..."
 | 
					echo "Waiting for all HollowNodes to become Running..."
 | 
				
			||||||
start=$(date +%s)
 | 
					start=$(date +%s)
 | 
				
			||||||
until [[ "$(kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get node | grep Ready | wc -l)" == "${NUM_NODES}" ]]; do
 | 
					nodes=$(kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get node) || true
 | 
				
			||||||
 | 
					ready=$(($(echo "${nodes}" | grep -v "NotReady" | wc -l) - 1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					until [[ "${ready}" -ge "${NUM_NODES}" ]]; do
 | 
				
			||||||
  echo -n .
 | 
					  echo -n .
 | 
				
			||||||
  sleep 1
 | 
					  sleep 1
 | 
				
			||||||
  now=$(date +%s)
 | 
					  now=$(date +%s)
 | 
				
			||||||
@@ -225,8 +228,17 @@ until [[ "$(kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get
 | 
				
			|||||||
  if [ $((now - start)) -gt 900 ]; then
 | 
					  if [ $((now - start)) -gt 900 ]; then
 | 
				
			||||||
    echo ""
 | 
					    echo ""
 | 
				
			||||||
    echo "Timeout waiting for all HollowNodes to become Running"
 | 
					    echo "Timeout waiting for all HollowNodes to become Running"
 | 
				
			||||||
 | 
					    # Try listing nodes again - if it fails it means that API server is not responding
 | 
				
			||||||
 | 
					    if kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get node &> /dev/null; then
 | 
				
			||||||
 | 
					      echo "Found only ${ready} ready Nodes while waiting for ${NUM_NODES}."
 | 
				
			||||||
      exit 1
 | 
					      exit 1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
					    echo "Got error while trying to list Nodes. Probably API server is down."
 | 
				
			||||||
 | 
					    exit 1
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  nodes=$(kubectl --kubeconfig="${KUBE_ROOT}"/test/kubemark/kubeconfig.loc get node) || true
 | 
				
			||||||
 | 
					  ready=$(($(echo "${nodes}" | grep -v "NotReady" | wc -l) - 1))
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo ""
 | 
					echo ""
 | 
				
			||||||
echo "Password to kubemark master: ${password}"
 | 
					echo "Password to kubemark master: ${password}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user