aboutsummaryrefslogtreecommitdiff
path: root/ec2/spark_ec2.py
diff options
context:
space:
mode:
Diffstat (limited to 'ec2/spark_ec2.py')
-rwxr-xr-xec2/spark_ec2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index 571d27fde6..aa2d360fbb 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -22,6 +22,7 @@ from __future__ import with_statement
import logging
import os
import random
+from retry_decorator import retry
import shutil
import subprocess
import sys
@@ -541,6 +542,7 @@ def scp(host, opts, local_file, dest_file):
# Run a command on a host through ssh, throwing an exception if ssh fails
+@retry(subprocess.CalledProcessError, tries=3, delay=30)
def ssh(host, opts, command):
subprocess.check_call(
"ssh -t -o StrictHostKeyChecking=no -i %s %s@%s '%s'" %