21ab4e
From 39b659e8cabc3a2f2bdd8fe41222f2425e8d067d Mon Sep 17 00:00:00 2001
21ab4e
From: Aravinda VK <avishwan@redhat.com>
21ab4e
Date: Thu, 10 Nov 2016 12:35:30 +0530
21ab4e
Subject: [PATCH 307/361] geo-rep: Do not restart workers when
21ab4e
 log-rsync-performance config change
21ab4e
21ab4e
Geo-rep restarts workers when any of the configurations changed. We
21ab4e
don't need to restart workers if tunables like log-rsync-performance
21ab4e
is modified.
21ab4e
21ab4e
With this patch, Geo-rep workers will get new "log-rsync-performance"
21ab4e
config automatically without restart.
21ab4e
21ab4e
mainline:
21ab4e
> BUG: 1393678
21ab4e
> Reviewed-on: http://review.gluster.org/15816
21ab4e
> Smoke: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
21ab4e
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
21ab4e
> Reviewed-by: Kotresh HR <khiremat@redhat.com>
21ab4e
(cherry picked from commit 423ac928402fa215fb4eda5f135fb725f6a2bf98)
21ab4e
21ab4e
BUG: 1425690
21ab4e
Change-Id: I40ec253892ea7e70c727fa5d3c540a11e891897b
21ab4e
Signed-off-by: Aravinda VK <avishwan@redhat.com>
21ab4e
Reviewed-on: https://code.engineering.redhat.com/gerrit/101287
21ab4e
Tested-by: Milind Changire <mchangir@redhat.com>
21ab4e
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
21ab4e
---
21ab4e
 geo-replication/syncdaemon/resource.py       | 6 ++++--
21ab4e
 xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 ++
21ab4e
 2 files changed, 6 insertions(+), 2 deletions(-)
21ab4e
21ab4e
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
21ab4e
index b887d37..be663e4 100644
21ab4e
--- a/geo-replication/syncdaemon/resource.py
21ab4e
+++ b/geo-replication/syncdaemon/resource.py
21ab4e
@@ -1001,7 +1001,8 @@ class SlaveRemote(object):
21ab4e
             (boolify(gconf.sync_acls) and ['--acls'] or []) + \
21ab4e
             ['.'] + list(args)
21ab4e
 
21ab4e
-        if gconf.log_rsync_performance:
21ab4e
+        if boolify(gconf.configinterface.get_realtime(
21ab4e
+                "log_rsync_performance")):
21ab4e
             # use stdout=PIPE only when log_rsync_performance enabled
21ab4e
             # Else rsync will write to stdout and nobody is their
21ab4e
             # to consume. If PIPE is full rsync hangs.
21ab4e
@@ -1020,7 +1021,8 @@ class SlaveRemote(object):
21ab4e
             for errline in stderr.strip().split("\n")[:-1]:
21ab4e
                 logging.error("SYNC Error(Rsync): %s" % errline)
21ab4e
 
21ab4e
-        if gconf.log_rsync_performance:
21ab4e
+        if boolify(gconf.configinterface.get_realtime(
21ab4e
+                "log_rsync_performance")):
21ab4e
             rsync_msg = []
21ab4e
             for line in stdout.split("\n"):
21ab4e
                 if line.startswith("Number of files:") or \
21ab4e
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
21ab4e
index a67dea1..9a702b7 100644
21ab4e
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
21ab4e
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
21ab4e
@@ -81,6 +81,8 @@ static char *gsync_reserved_opts[] = {
21ab4e
 
21ab4e
 static char *gsync_no_restart_opts[] = {
21ab4e
         "checkpoint",
21ab4e
+        "log_rsync_performance",
21ab4e
+        "log-rsync-performance",
21ab4e
         NULL
21ab4e
 };
21ab4e
 
21ab4e
-- 
21ab4e
1.8.3.1
21ab4e