Skip to content

Commit

Permalink
Don't delete files in rsync up, and also shorten timeout (ray-project…
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl authored Apr 25, 2019
1 parent fb2655f commit 47cca97
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/ray/autoscaler/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] + [
Expand Down Expand Up @@ -240,9 +240,8 @@ def rsync_up(self, source, target, redirect=None, check_error=True):
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)
Expand Down

0 comments on commit 47cca97

Please sign in to comment.