From 532f2d36e72b4e30984e437ca5a3507de5e897d9 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 29 Feb 2012 10:21:09 +0100 Subject: geo-rep / syncdaemon: make the timeout for establishing the connection to slave configurable It can be set through the connection-timeout tunable but we keep it hidden, intended as a workaround for some special scenarios not for general use. Change-Id: I31f9fa3873afa7babc2106ee34484123a01bdc57 BUG: 789078 Signed-off-by: Csaba Henk Reviewed-on: http://review.gluster.com/2840 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/marker/utils/syncdaemon/gsyncd.py | 1 + xlators/features/marker/utils/syncdaemon/monitor.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index 99e2204b2..d6abbc66f 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -137,6 +137,7 @@ def main_i(): op.add_option('--rsync-command', metavar='CMD', default='rsync') op.add_option('--rsync-extra', metavar='ARGS', default='-sS', help=SUPPRESS_HELP) op.add_option('--timeout', metavar='SEC', type=int, default=120) + op.add_option('--connection-timeout', metavar='SEC', type=int, default=60, help=SUPPRESS_HELP) op.add_option('--sync-jobs', metavar='N', type=int, default=3) op.add_option('--turns', metavar='N', type=int, default=0, help=SUPPRESS_HELP) diff --git a/xlators/features/marker/utils/syncdaemon/monitor.py b/xlators/features/marker/utils/syncdaemon/monitor.py index f58aa592c..056a47f71 100644 --- a/xlators/features/marker/utils/syncdaemon/monitor.py +++ b/xlators/features/marker/utils/syncdaemon/monitor.py @@ -54,7 +54,7 @@ class Monitor(object): if os.WIFEXITED(s): return os.WEXITSTATUS(s) return 1 - conn_timeout = 60 + conn_timeout = int(gconf.connection_timeout) while ret in (0, 1): logging.info('-' * conn_timeout) logging.info('starting gsyncd worker') -- cgit