mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Fix pod that's looked for on kube up.
This commit is contained in:
parent
3f2309ad15
commit
152a461f39
@ -672,11 +672,12 @@ function kube-up {
|
|||||||
# Basic sanity checking
|
# Basic sanity checking
|
||||||
local i
|
local i
|
||||||
local rc # Capture return code without exiting because of errexit bash option
|
local rc # Capture return code without exiting because of errexit bash option
|
||||||
|
local pause_pod="google_containers/pause"
|
||||||
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||||
# Make sure docker is installed and working.
|
# Make sure docker is installed and working.
|
||||||
local attempt=0
|
local attempt=0
|
||||||
while true; do
|
while true; do
|
||||||
echo -n Attempt "$(($attempt+1))" to check Docker on node "${MINION_NAMES[$i]}" ...
|
echo -n Attempt "$(($attempt+1))" to check Docker and pause pod on node "${MINION_NAMES[$i]}" ...
|
||||||
local output=$(gcloud compute --project "${PROJECT}" ssh --zone "$ZONE" "${MINION_NAMES[$i]}" --command "sudo docker ps -a" 2>/dev/null)
|
local output=$(gcloud compute --project "${PROJECT}" ssh --zone "$ZONE" "${MINION_NAMES[$i]}" --command "sudo docker ps -a" 2>/dev/null)
|
||||||
if [[ -z "${output}" ]]; then
|
if [[ -z "${output}" ]]; then
|
||||||
if (( attempt > 9 )); then
|
if (( attempt > 9 )); then
|
||||||
@ -686,10 +687,10 @@ function kube-up {
|
|||||||
echo -e "cluster. (sorry!)${color_norm}" >&2
|
echo -e "cluster. (sorry!)${color_norm}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ "${output}" != *"kubernetes/pause"* ]]; then
|
elif [[ ! `echo "${output}" | grep "${pause_pod}"` ]]; then
|
||||||
if (( attempt > 9 )); then
|
if (( attempt > 9 )); then
|
||||||
echo
|
echo
|
||||||
echo -e "${color_red}Failed to observe kubernetes/pause on node ${MINION_NAMES[$i]}. Your cluster is unlikely" >&2
|
echo -e "${color_red}Failed to observe ${pause_pod} on node ${MINION_NAMES[$i]}. Your cluster is unlikely" >&2
|
||||||
echo "to work correctly. Please run ./cluster/kube-down.sh and re-create the" >&2
|
echo "to work correctly. Please run ./cluster/kube-down.sh and re-create the" >&2
|
||||||
echo -e "cluster. (sorry!)${color_norm}" >&2
|
echo -e "cluster. (sorry!)${color_norm}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user