From ba5cadef5940285cb8d6ab6e10793185e055e9e6 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Fri, 11 Jul 2014 16:12:09 -0700 Subject: [PATCH] Add some sanity checks to the kube-up script. --- cluster/kube-up.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index 3a4f97ececc..bb5d6223166 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -133,6 +133,25 @@ until $(curl --insecure --user ${user}:${passwd} --max-time 1 \ sleep 2 done +# Basic sanity checking +for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + # Make sure docker is installed + gcutil ssh ${MINION_NAMES[$i]} which docker > /dev/null + if [ "$?" != "0" ]; then + echo "Docker failed to install on ${MINION_NAMES[$i]} your cluster is unlikely to work correctly" + echo "Please run ./cluster/kube-down.sh and re-create the cluster. (sorry!)" + exit 1 + fi + + # Make sure the kubelet is running + gcutil ssh ${MINION_NAMES[$i]} /etc/init.d/kubelet status + if [ "$?" != "0" ]; then + echo "Kubelet failed to install on ${MINION_NAMES[$i]} your cluster is unlikely to work correctly" + echo "Please run ./cluster/kube-down.sh and re-create the cluster. (sorry!)" + exit 1 + fi +done + echo echo "Kubernetes cluster is running. Access the master at:" echo