[CRIU] [PATCH 2/3] p.haul: make rsync use ssh socket
Ruslan Kuprieiev
kupruser at gmail.com
Sun Mar 8 12:38:45 PDT 2015
Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
fs_haul_subtree.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs_haul_subtree.py b/fs_haul_subtree.py
index 3181c79..11af208 100644
--- a/fs_haul_subtree.py
+++ b/fs_haul_subtree.py
@@ -6,6 +6,7 @@
import subprocess as sp
import os
+import ssh
rsync_log_file = "rsync.log"
@@ -29,8 +30,12 @@ class p_haul_fs:
# to produce big pause between the 1st pre-dump and
# .stop_migration
- ret = sp.call(["rsync", "-a", self.__root, dst],
+ if ssh._no_ssh:
+ ret = sp.call(["rsync", "-a", self.__root, dst],
stdout = logf, stderr = logf)
+ else:
+ ret = sp.call(["rsync", "-e", "'%s'" % ssh.opts['SSH_BASE'],
+ "-a", self.__root], stdout = logf, stderr = logf)
if ret != 0:
raise Exception("Rsync failed")
--
2.1.0
More information about the CRIU
mailing list