AWS: delay less when creating tags

This is important because tag creation isn't atomic, and we want to minimize
the window in which we can leave 'dangling' resources around.
This commit is contained in:
Justin Santa Barbara 2015-06-12 18:29:31 -04:00
parent 3ce7fe8310
commit 6839ae9a44

View File

@ -473,12 +473,11 @@ function add-tag {
echo "Adding tag to ${1}: ${2}=${3}"
# We need to retry in case the resource isn't yet fully created
sleep 3
n=0
until [ $n -ge 5 ]; do
until [ $n -ge 25 ]; do
$AWS_CMD create-tags --resources ${1} --tags Key=${2},Value=${3} > $LOG && return
n=$[$n+1]
sleep 15
sleep 3
done
echo "Unable to add tag to AWS resource"