diff options
author | Ewen Cheslack-Postava <me@ewencp.org> | 2013-12-16 08:09:37 -0800 |
---|---|---|
committer | Ewen Cheslack-Postava <me@ewencp.org> | 2013-12-16 08:09:37 -0800 |
commit | d17c142615f7d0ff514a74779e433107659a78b9 (patch) | |
tree | 36a87904286dd7d774e7193ae181e9d1aa77e021 /ec2 | |
parent | a51f3404ad8711f5fe66381122c5fa1ead09b3da (diff) | |
download | spark-d17c142615f7d0ff514a74779e433107659a78b9.tar.gz spark-d17c142615f7d0ff514a74779e433107659a78b9.tar.bz2 spark-d17c142615f7d0ff514a74779e433107659a78b9.zip |
Force pseudo-tty allocation in spark-ec2 script.
ssh commands need the -t argument repeated twice if there is no local
tty, e.g. if the process running spark-ec2 uses nohup and the parent
process exits.
Diffstat (limited to 'ec2')
-rwxr-xr-x | ec2/spark_ec2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index 1189232428..a2b0e7e7f4 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -589,7 +589,7 @@ def ssh(host, opts, command): while True: try: return subprocess.check_call( - ssh_command(opts) + ['-t', '%s@%s' % (opts.user, host), stringify_command(command)]) + ssh_command(opts) + ['-t', '-t', '%s@%s' % (opts.user, host), stringify_command(command)]) except subprocess.CalledProcessError as e: if (tries > 2): # If this was an ssh failure, provide the user with hints. @@ -730,7 +730,7 @@ def real_main(): if opts.proxy_port != None: proxy_opt = ['-D', opts.proxy_port] subprocess.check_call( - ssh_command(opts) + proxy_opt + ['-t', "%s@%s" % (opts.user, master)]) + ssh_command(opts) + proxy_opt + ['-t', '-t', "%s@%s" % (opts.user, master)]) elif action == "get-master": (master_nodes, slave_nodes) = get_existing_cluster(conn, opts, cluster_name) |