summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon
diff options
context:
space:
mode:
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r--geo-replication/syncdaemon/gsyncd.py5
-rw-r--r--geo-replication/syncdaemon/master.py16
-rw-r--r--geo-replication/syncdaemon/resource.py12
3 files changed, 21 insertions, 12 deletions
diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py
index b459abcccee..6591716056c 100644
--- a/geo-replication/syncdaemon/gsyncd.py
+++ b/geo-replication/syncdaemon/gsyncd.py
@@ -539,7 +539,10 @@ def main_i():
if not 'config_file' in rconf:
rconf['config_file'] = TMPL_CONFIG_FILE
- upgrade_config_file(rconf['config_file'], confdata)
+ # Upgrade Config File only if it is session conf file
+ if rconf['config_file'] != TMPL_CONFIG_FILE:
+ upgrade_config_file(rconf['config_file'], confdata)
+
gcnf = GConffile(
rconf['config_file'], canon_peers, confdata,
defaults.__dict__, opts.__dict__, namedict)
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index 796b9806f3a..b65abf98589 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -1069,13 +1069,15 @@ class GMasterChangelogMixin(GMasterCommon):
self.sendmark(path, stime)
# Update last_synced_time in status file based on stime
- chkpt_time = gconf.configinterface.get_realtime(
- "checkpoint")
- checkpoint_time = 0
- if chkpt_time is not None:
- checkpoint_time = int(chkpt_time)
-
- self.status.set_last_synced(stime, checkpoint_time)
+ # only update stime if stime xattr set to Brick root
+ if path == self.FLAT_DIR_HIERARCHY:
+ chkpt_time = gconf.configinterface.get_realtime(
+ "checkpoint")
+ checkpoint_time = 0
+ if chkpt_time is not None:
+ checkpoint_time = int(chkpt_time)
+
+ self.status.set_last_synced(stime, checkpoint_time)
def update_worker_remote_node(self):
node = sys.argv[-1]
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 \