Skip to content

Commit

Permalink
Fix retries in bootstrap.sh
Browse files Browse the repository at this point in the history
If `aws eks describe-cluster` fails the first time, the retries never work because the `rc` value is never able to be set back to zero
  • Loading branch information
aackerman authored and mogren committed Jan 23, 2020
1 parent 2edc668 commit f80c682
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,10 @@ CA_CERTIFICATE_FILE_PATH=$CA_CERTIFICATE_DIRECTORY/ca.crt
mkdir -p $CA_CERTIFICATE_DIRECTORY
if [[ -z "${B64_CLUSTER_CA}" ]] && [[ -z "${APISERVER_ENDPOINT}" ]]; then
DESCRIBE_CLUSTER_RESULT="/tmp/describe_cluster_result.txt"
rc=0
# Retry the DescribleCluster API for API_RETRY_ATTEMPTS

# Retry the DescribeCluster API for API_RETRY_ATTEMPTS
for attempt in `seq 0 $API_RETRY_ATTEMPTS`; do
rc=0
if [[ $attempt -gt 0 ]]; then
echo "Attempt $attempt of $API_RETRY_ATTEMPTS"
fi
Expand Down

0 comments on commit f80c682

Please sign in to comment.