Skip to content

Commit

Permalink
🐛 Set error_exit code arg in kubeadm bootstrap script
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed Jan 14, 2021
1 parent a5dee81 commit 6f36be4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ check_kubeadm_command() {
log::error "kubeadm reported preflight check error during ${command}"
;;
"3")
log::error_exit "kubeadm reported validation error for ${command}"
log::error_exit "kubeadm reported validation error for ${command}" "${code}"
;;
*)
log::error "kubeadm reported unknown error ${code} for ${command}"
Expand Down Expand Up @@ -102,7 +102,7 @@ function retry-command() {
sleep 15
done
if [ ${kubeadm_return} -ne 0 ]; then
log::error_exit "too many errors, exiting"
log::error_exit "too many errors, exiting" "${kubeadm_return}"
fi
}

Expand All @@ -115,7 +115,7 @@ function try-or-die-command() {
kubeadm_return=$?
check_kubeadm_command "'$*'" "${kubeadm_return}"
if [ ${kubeadm_return} -ne 0 ]; then
log::error_exit "fatal error, exiting"
log::error_exit "fatal error, exiting" "${kubeadm_return}"
fi
}
# {{ end }}
Expand Down

0 comments on commit 6f36be4

Please sign in to comment.