You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/11/27 04:25:25 UTC
spark git commit: [SPARK-11991] fixes
Repository: spark
Updated Branches:
refs/heads/master 4d4cbc034 -> 5eaed4e45
[SPARK-11991] fixes
If `--private-ips` is required but not provided, spark_ec2.py may behave inappropriately, including attempting to ssh to localhost in attempts to verify ssh connectivity to the cluster.
This fixes that behavior by raising a `UsageError` exception if `get_dns_name` is unable to determine a hostname as a result.
Author: Jeremy Derr <jc...@radius.com>
Closes #9975 from jcderr/SPARK-11991/ec_spark.py_hostname_check.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5eaed4e4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5eaed4e4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5eaed4e4
Branch: refs/heads/master
Commit: 5eaed4e45c6c57e995ac7438016fad545716e596
Parents: 4d4cbc0
Author: Jeremy Derr <jc...@radius.com>
Authored: Thu Nov 26 19:25:13 2015 -0800
Committer: Reynold Xin <rx...@databricks.com>
Committed: Thu Nov 26 19:25:13 2015 -0800
----------------------------------------------------------------------
ec2/spark_ec2.py | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/5eaed4e4/ec2/spark_ec2.py
----------------------------------------------------------------------
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index 9fd652a..84a950c 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -1242,6 +1242,10 @@ def get_ip_address(instance, private_ips=False):
def get_dns_name(instance, private_ips=False):
dns = instance.public_dns_name if not private_ips else \
instance.private_ip_address
+ if not dns:
+ raise UsageError("Failed to determine hostname of {0}.\n"
+ "Please check that you provided --private-ips if "
+ "necessary".format(instance))
return dns
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org