From 6f36be447507dcf8ac2e84ee781721ea82528b7f Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 14 Jan 2021 14:42:52 -0800 Subject: [PATCH] :bug: Set error_exit code arg in kubeadm bootstrap script --- .../kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh b/bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh index 45cfe79196c5..5c78238ce0ac 100644 --- a/bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh +++ b/bootstrap/kubeadm/internal/cloudinit/kubeadm-bootstrap-script.sh @@ -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}" @@ -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 } @@ -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 }}