mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 09:47:06 +00:00
Azure: Wait for salt completion on cluster initlization
Fix for #3177. Add a loop at the end of cluster initlization to wait for salt completion. This may never complete if there was a cluster deployment error.
This commit is contained in:
@@ -460,21 +460,22 @@ EOF
|
|||||||
"${HOME}/${kube_key}" "${HOME}/${ca_cert}"
|
"${HOME}/${kube_key}" "${HOME}/${ca_cert}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wait for salt on the minions
|
|
||||||
sleep 30
|
|
||||||
|
|
||||||
echo "Sanity checking cluster..."
|
echo "Sanity checking cluster..."
|
||||||
|
echo
|
||||||
|
echo " This will continually check the minions to ensure docker is"
|
||||||
|
echo " installed. This is usually a good indicator that salt has"
|
||||||
|
echo " successfully provisioned. This might loop forever if there was"
|
||||||
|
echo " some uncaught error during start up."
|
||||||
|
echo
|
||||||
# Basic sanity checking
|
# Basic sanity checking
|
||||||
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
|
||||||
# Make sure docker is installed
|
# Make sure docker is installed
|
||||||
echo "--> Making sure docker is installed on ${MINION_NAMES[$i]}."
|
echo "--> Making sure docker is installed on ${MINION_NAMES[$i]}."
|
||||||
ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} \
|
until ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} \
|
||||||
$AZ_CS.cloudapp.net which docker > /dev/null || {
|
$AZ_CS.cloudapp.net which docker > /dev/null 2>&1; do
|
||||||
echo "Docker failed to install on ${MINION_NAMES[$i]}. Your cluster is unlikely" >&2
|
printf "."
|
||||||
echo "to work correctly. Please run ./cluster/kube-down.sh and re-create the" >&2
|
sleep 2
|
||||||
echo "cluster. (sorry!)" >&2
|
done
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
Reference in New Issue
Block a user