Skip to content

Commit

Permalink
Merge pull request #4079 from CecileRobertMichon/kubeadm-script-code
Browse files Browse the repository at this point in the history
🐛   Set error_exit code arg in kubeadm bootstrap script
  • Loading branch information
k8s-ci-robot authored Jan 22, 2021
2 parents e851972 + b3edcfe commit fc42ce2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
4 changes: 2 additions & 2 deletions bootstrap/kubeadm/internal/cloudinit/zz_generated.bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc42ce2

Please sign in to comment.