diff options
author | Csaba Henk <csaba@gluster.com> | 2011-05-31 11:06:54 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-05-31 10:01:41 -0700 |
commit | a2b30a1848ee69854c1de87cd1e3d1d74e96a964 (patch) | |
tree | 7e95edf1b1c8af125be4f04f8ed8b96ac99848b1 /xlators/features/marker/utils/syncdaemon/gsyncd.py | |
parent | e58cb9aa2f21b6453f9533a174fae0cbfda1e98c (diff) |
syncdaemon: some refactor on monitor
- detect faulty state early
- keep the feedback fd in gsyncd module
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2537 (gsync autorestart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2537
BUG: 2537 (gsync autorestart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2537
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/gsyncd.py')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/gsyncd.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index 60980f546..193af9d5f 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -249,8 +249,7 @@ def main_i(): ffd = rconf.get('feedback_fd') if ffd: - gconf.feedback_fd = ffd - fcntl.fcntl(int(ffd), fcntl.F_SETFD, fcntl.FD_CLOEXEC) + fcntl.fcntl(ffd, fcntl.F_SETFD, fcntl.FD_CLOEXEC) #normalize loglevel lvl0 = gconf.log_level @@ -292,6 +291,8 @@ def main_i(): # complete remote connection in child remote.connect_remote(go_daemon='done') local.connect() + if ffd: + os.close(ffd) local.service_loop(*[r for r in [remote] if r]) logging.info("exiting.") |