diff options
author | Csaba Henk <csaba@gluster.com> | 2011-07-15 02:45:18 +0200 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-25 05:36:45 -0700 |
commit | b617b89372f9f6cb5031dfb8513029a7fa490f73 (patch) | |
tree | 0517a825e979f0615ddea7e8507ea6261db5f1e2 /xlators/features/marker/utils/syncdaemon/gsyncd.py | |
parent | f9b09cd2be47c044c1396e70724a427ef46f8b81 (diff) |
gsyncd: refine command invocation
Use subprocess module instead of os.spawn* / ad-hoc fork/exec.
With this, we do now:
- close uneeded files in children
- watch childrens' stderr:
- have a thread which collects childrens' stderr into a ring buffer
(so that stderr pipe doesn't get stuffed)
- on command failure show stderr
- distinguish between rsync exit values, tolerate only partial errors
- if connection is broken to slave, show ssh/slave gsycd's stderr
Change-Id: Ia92f57b5bdfa47f8c44375c50cf279006a0bf69b
BUG: 2946
Reviewed-on: http://review.gluster.com/85
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Kaushik BV <kaushikbv@gluster.com>
Reviewed-by: Kaushik BV <kaushikbv@gluster.com>
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/gsyncd.py')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/gsyncd.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py index fb1dc1b9c..960b83c13 100644 --- a/xlators/features/marker/utils/syncdaemon/gsyncd.py +++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py @@ -289,6 +289,7 @@ def main_i(): return monitor() logging.info("syncing: %s" % " -> ".join(peers)) + resource.Popen.init_errhandler() if remote: go_daemon = remote.connect_remote(go_daemon=go_daemon) if go_daemon: |