Don't delete files in rsync up, and also shorten timeout (#4688)

This commit is contained in:
Eric Liang
2019-04-25 12:18:42 -07:00
committed by GitHub
parent fb2655fa93
commit 47cca971b5
+3 -4
View File
@@ -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)