From 39b659e8cabc3a2f2bdd8fe41222f2425e8d067d Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Thu, 10 Nov 2016 12:35:30 +0530 Subject: [PATCH 307/361] geo-rep: Do not restart workers when log-rsync-performance config change Geo-rep restarts workers when any of the configurations changed. We don't need to restart workers if tunables like log-rsync-performance is modified. With this patch, Geo-rep workers will get new "log-rsync-performance" config automatically without restart. mainline: > BUG: 1393678 > Reviewed-on: http://review.gluster.org/15816 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: Kotresh HR (cherry picked from commit 423ac928402fa215fb4eda5f135fb725f6a2bf98) BUG: 1425690 Change-Id: I40ec253892ea7e70c727fa5d3c540a11e891897b Signed-off-by: Aravinda VK Reviewed-on: https://code.engineering.redhat.com/gerrit/101287 Tested-by: Milind Changire Reviewed-by: Atin Mukherjee --- geo-replication/syncdaemon/resource.py | 6 ++++-- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index b887d37..be663e4 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -1001,7 +1001,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 +1021,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 \ diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index a67dea1..9a702b7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -81,6 +81,8 @@ static char *gsync_reserved_opts[] = { static char *gsync_no_restart_opts[] = { "checkpoint", + "log_rsync_performance", + "log-rsync-performance", NULL }; -- 1.8.3.1