diff options
author | msiddalingaiah <madhu@madhu.com> | 2014-05-04 21:59:10 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-05-04 21:59:10 -0700 |
commit | bb2bb0cf6efcb1d18846e6c4904f3cd2da452f9f (patch) | |
tree | 615fa749bdf56a931cd57c807cff5c8b27236761 /ec2/spark_ec2.py | |
parent | b48a55ae9ff2976c5fe6f5776a6d4659e828ee24 (diff) | |
download | spark-bb2bb0cf6efcb1d18846e6c4904f3cd2da452f9f.tar.gz spark-bb2bb0cf6efcb1d18846e6c4904f3cd2da452f9f.tar.bz2 spark-bb2bb0cf6efcb1d18846e6c4904f3cd2da452f9f.zip |
Address SPARK-1717
I tested the change locally with Spark 0.9.1, but I can't test with 1.0.0 because there was no AMI for it at the time. It's a trivial fix, so it shouldn't cause any problems.
Author: msiddalingaiah <madhu@madhu.com>
Closes #641 from msiddalingaiah/master and squashes the following commits:
a4f7404 [msiddalingaiah] Address SPARK-1717
Diffstat (limited to 'ec2/spark_ec2.py')
-rwxr-xr-x | ec2/spark_ec2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index 0f6d5a1fa8..0a8d6ca5d7 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -612,7 +612,7 @@ def ssh_command(opts): return ['ssh'] + ssh_args(opts) -# Run a command on a host through ssh, retrying up to two times +# Run a command on a host through ssh, retrying up to five times # and then throwing an exception if ssh continues to fail. def ssh(host, opts, command): tries = 0 @@ -621,7 +621,7 @@ def ssh(host, opts, command): return subprocess.check_call( ssh_command(opts) + ['-t', '-t', '%s@%s' % (opts.user, host), stringify_command(command)]) except subprocess.CalledProcessError as e: - if (tries > 2): + if (tries > 5): # If this was an ssh failure, provide the user with hints. if e.returncode == 255: raise UsageError("Failed to SSH to remote host {0}.\nPlease check that you have provided the correct --identity-file and --key-pair parameters and try again.".format(host)) @@ -648,7 +648,7 @@ def ssh_write(host, opts, command, input): status = proc.wait() if status == 0: break - elif (tries > 2): + elif (tries > 5): raise RuntimeError("ssh_write failed with error %s" % proc.returncode) else: print >> stderr, "Error {0} while executing remote command, retrying after 30 seconds".format(status) |