Skip to content

Commit

Permalink
SPARK-3608 Break if the instance tag naming succeeds
Browse files Browse the repository at this point in the history
Author: Vida Ha <vida@databricks.com>

Closes #2466 from vidaha/vida/spark-3608 and squashes the following commits:

9509776 [Vida Ha] Break if the instance tag naming succeeds
  • Loading branch information
vidaha authored and rxin committed Sep 20, 2014
1 parent 8af2370 commit 78d4220
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ec2/spark_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ def tag_instance(instance, name):
for i in range(0, 5):
try:
instance.add_tag(key='Name', value=name)
break
except:
print "Failed attempt %i of 5 to tag %s" % ((i + 1), name)
if (i == 5):
Expand Down

0 comments on commit 78d4220

Please sign in to comment.