From 9aedb839b9df58615c6b3934f7aa1edd95e61052 Mon Sep 17 00:00:00 2001 From: Mike Sarfaty Date: Wed, 18 Dec 2024 15:27:40 -0500 Subject: [PATCH] fix: check return code of aws eks wait call --- templates/al2/runtime/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/al2/runtime/bootstrap.sh b/templates/al2/runtime/bootstrap.sh index 377251074..8358f5d16 100755 --- a/templates/al2/runtime/bootstrap.sh +++ b/templates/al2/runtime/bootstrap.sh @@ -362,9 +362,9 @@ if [[ -z "${B64_CLUSTER_CA}" ]] || [[ -z "${APISERVER_ENDPOINT}" ]]; then aws eks wait cluster-active \ --region=${AWS_DEFAULT_REGION} \ - --name=${CLUSTER_NAME} + --name=${CLUSTER_NAME} || rc=$? - aws eks describe-cluster \ + [[ $rc -eq 0 ]] && aws eks describe-cluster \ --region=${AWS_DEFAULT_REGION} \ --name=${CLUSTER_NAME} \ --output=text \