From 47cca971b52365103a72ffdf5558f7ea90fb2752 Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Thu, 25 Apr 2019 12:18:42 -0700 Subject: [PATCH] Don't delete files in rsync up, and also shorten timeout (#4688) --- python/ray/autoscaler/updater.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/python/ray/autoscaler/updater.py b/python/ray/autoscaler/updater.py index 942d1a151..9fff0c767 100644 --- a/python/ray/autoscaler/updater.py +++ b/python/ray/autoscaler/updater.py @@ -31,7 +31,7 @@ def get_default_ssh_options(private_key, connect_timeout, ssh_control_path): ("StrictHostKeyChecking", "no"), ("ControlMaster", "auto"), ("ControlPath", "{}/%C".format(ssh_control_path)), - ("ControlPersist", "5m"), + ("ControlPersist", "10s"), ] return ["-i", private_key] + [ @@ -240,9 +240,8 @@ class NodeUpdater(object): self.get_caller(check_error)( [ "rsync", "-e", " ".join(["ssh"] + get_default_ssh_options( - self.ssh_private_key, 120, self.ssh_control_path)), - "--delete", "-avz", source, "{}@{}:{}".format( - self.ssh_user, self.ssh_ip, target) + self.ssh_private_key, 120, self.ssh_control_path)), "-avz", + source, "{}@{}:{}".format(self.ssh_user, self.ssh_ip, target) ], stdout=redirect or sys.stdout, stderr=redirect or sys.stderr)