From 6839ae9a44f50ea22dc1e97fa41904ae8a796f0c Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Fri, 12 Jun 2015 18:29:31 -0400 Subject: [PATCH] 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. --- cluster/aws/util.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 1d56894992b..4de7666335c 100644 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -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"