diff options
author | Kevin Vigor <kvigor@fb.com> | 2017-01-05 12:21:20 -0800 |
---|---|---|
committer | Kevin Vigor <kvigor@fb.com> | 2017-01-05 12:21:20 -0800 |
commit | c27aa58e72cf528583c585691e65abdb765535e5 (patch) | |
tree | fae75e5b924ac4fb80a3d4ed42203638732fbb52 /geo-replication/syncdaemon/resource.py | |
parent | 63403742f53ec59a6acbe26ff4c39bab1b0842ed (diff) | |
parent | cb8bc3396d16e777d9a2683886fefd43e747e8a3 (diff) |
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8-again
Change-Id: I844adf2aef161a44d446f8cd9b7ebcb224ee618a
Signed-off-by: Kevin Vigor <kvigor@fb.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r-- | geo-replication/syncdaemon/resource.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 6d26a56a7bf..7daf7e49211 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -784,11 +784,13 @@ class Server(object): if st.st_ino == st1.st_ino: # we have a hard link, we can now unlink source try: - os.unlink(entry) + errno_wrap(os.unlink, [entry], + [ENOENT, ESTALE]) except OSError as e: if e.errno == EISDIR: try: - os.rmdir(entry) + errno_wrap(os.rmdir, [entry], + [ENOENT, ESTALE]) except OSError as e: if e.errno == ENOTEMPTY: logging.error( @@ -1001,7 +1003,8 @@ class SlaveRemote(object): (boolify(gconf.sync_acls) and ['--acls'] or []) + \ ['.'] + list(args) - if gconf.log_rsync_performance: + if boolify(gconf.configinterface.get_realtime( + "log_rsync_performance")): # use stdout=PIPE only when log_rsync_performance enabled # Else rsync will write to stdout and nobody is their # to consume. If PIPE is full rsync hangs. @@ -1020,7 +1023,8 @@ class SlaveRemote(object): for errline in stderr.strip().split("\n")[:-1]: logging.error("SYNC Error(Rsync): %s" % errline) - if gconf.log_rsync_performance: + if boolify(gconf.configinterface.get_realtime( + "log_rsync_performance")): rsync_msg = [] for line in stdout.split("\n"): if line.startswith("Number of files:") or \ |