Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4162#discussion_r23421637
  
    --- Diff: ec2/spark_ec2.py ---
    @@ -346,9 +347,15 @@ def get_spark_ami(opts):
     # Returns a tuple of EC2 reservation objects for the master and slaves
     # Fails if there already instances running in the cluster's groups.
     def launch_cluster(conn, opts, cluster_name):
    -    if opts.identity_file is None:
    +    if opts.identity_file is None or \
    +       not os.path.exists(opts.identity_file):
             print >> stderr, "ERROR: Must provide an identity file (-i) for 
ssh connections."
    --- End diff --
    
    It might be confusing to show the same error message in the case where an 
identity file is provided but cannot be found. Maybe show a separate error for 
that?
    
    Also, what happens if you don't check `os.path.exists(opts.identity_file)` 
upfront and just let the launch proceed?


---
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]

Reply via email to