fail fast if kubelet start failed

This commit is contained in:
jayunit100 2016-11-16 14:49:19 -05:00
parent d60d9f3269
commit 378c837e7a

View File

@ -513,6 +513,12 @@ function start_kubelet {
${image_service_endpoint_args} \
--port="$KUBELET_PORT" >"${KUBELET_LOG}" 2>&1 &
KUBELET_PID=$!
# Quick check that kubelet is running.
if ps -p $KUBELET_PID > /dev/null ; then
echo "kubelet ( $KUBELET_PID ) is running."
else
cat ${KUBELET_LOG} ; exit 1
fi
else
# Docker won't run a container with a cidfile (container id file)
# unless that file does not already exist; clean up an existing