Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/1899#discussion_r16304946
--- Diff: ec2/spark_ec2.py ---
@@ -440,14 +449,22 @@ def launch_cluster(conn, opts, cluster_name):
print "Launched master in %s, regid = %s" % (zone, master_res.id)
# Give the instances descriptive names
+ # TODO: Add retry logic for tagging with name since it's used to
identify a cluster.
for master in master_nodes:
- master.add_tag(
- key='Name',
- value='{cn}-master-{iid}'.format(cn=cluster_name,
iid=master.id))
+ name = '{cn}-master-{iid}'.format(cn=cluster_name, iid=master.id)
+ for i in range(0, 5):
+ master.add_tag(key='Name', value=name)
--- End diff --
What happens if an `add_tag` call fails? My bet is that it throws an
exception rather than silently failing, in which case this re-try logic won't
run. Rather than using this "set-and-test" logic, maybe we can just wrap the
call in a try-except block?
@shivaram Did the eventual-consistency issue that you saw result in
exceptions from `add_tag`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]