Skip to content

Commit

Permalink
Revert "implement backoff in case of IMDS missing data"
Browse files Browse the repository at this point in the history
This reverts commit 30c59d6.
  • Loading branch information
ssuryad-amzn authored and saiharsha1994 committed Aug 9, 2024
1 parent 991f7e8 commit 14ee439
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ error() {
get_meta() {
local key=$1
local max_tries=${2:-10}
local -i attempts=0 ms_per_backoff=100 backoff=0
declare -i attempts=0
debug "[get_meta] Querying IMDS for ${key}"

get_token
Expand All @@ -96,8 +96,6 @@ get_meta() {
return 0
fi
attempts+=1
backoff=$((attempts*ms_per_backoff))
sleep $((backoff/1000)).$((backoff%1000))
done
return 1
}
Expand Down

0 comments on commit 14ee439

Please sign in to comment.