From f8f6eb7ed7d824935abf9a5e69a6cd054872a537 Mon Sep 17 00:00:00 2001 From: JF Ding Date: Fri, 15 Aug 2014 19:18:07 +0800 Subject: [PATCH] To use "--delay-updates" for rsync for atomic sync Sometime, the users noticed the images in download server have wrong md5sum and cannot boot. It's possible it's a partial downloaded file, caused by atomic rsyncing problem. This rsync command line option will help it. Change-Id: I9ef2344cd01594fb33080feaaa193714cb4a5570 Signed-off-by: JF Ding --- common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils.py b/common/utils.py index 0e3c468..70769f8 100644 --- a/common/utils.py +++ b/common/utils.py @@ -118,7 +118,7 @@ def sync(source, destination, remove=True): # Through rsync protocol if destination.startswith('rsync:'): - cmd = "rsync -av %s/ %s" % (source, destination) + cmd = "rsync -av --delay-updates %s/ %s" % (source, destination) try: ret_code = subprocess.call(cmd, shell = True) -- 2.7.4