summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-18 17:25:29 +0000
committerAnand Avati <avati@gluster.com>2011-04-19 02:30:38 -0700
commit8d034b840e957d96a3c3e1f86a3ff28aabb8c896 (patch)
treeaef3c9993e37dfca59148963abb8361de831094f /xlators/features/marker
parent369f66ea51506315545501ab3fd4fe87d011a0e5 (diff)
syncdaemon: add session-owner option
Signed-off-by: Csaba Henk <csaba@lowlife.hu> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2785 (gsyncd logs on slave side go to /dev/null) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/utils/syncdaemon/gsyncd.py1
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py8
2 files changed, 8 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py
index 76358414f89..c52d1a21811 100644
--- a/xlators/features/marker/utils/syncdaemon/gsyncd.py
+++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py
@@ -129,6 +129,7 @@ def main_i():
op.add_option('-L', '--log-level', metavar='LVL')
op.add_option('-r', '--remote-gsyncd', metavar='CMD', default=os.path.abspath(sys.argv[0]))
op.add_option('--volume-id', metavar='UUID')
+ op.add_option('--session-owner', metavar='ID')
op.add_option('-s', '--ssh-command', metavar='CMD', default='ssh')
op.add_option('--rsync-command', metavar='CMD', default='rsync')
op.add_option('--rsync-extra', metavar='ARGS', default='-sS', help=SUPPRESS_HELP)
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index 7db7d5bb40f..3987b7ae909 100644
--- a/xlators/features/marker/utils/syncdaemon/resource.py
+++ b/xlators/features/marker/utils/syncdaemon/resource.py
@@ -220,7 +220,13 @@ class SlaveRemote(object):
os.dup2(ix, sys.stdin.fileno())
os.close(iy)
os.dup2(oy, sys.stdout.fileno())
- argv = rargs + gconf.remote_gsyncd.split() + ['-N', '--listen', '--timeout', str(gconf.timeout), slave]
+ so = getattr(gconf, 'session_owner', None)
+ if so:
+ so_args = ['--session-owner', so]
+ else:
+ so_args = []
+ argv = rargs + gconf.remote_gsyncd.split() + so_args + \
+ ['-N', '--listen', '--timeout', str(gconf.timeout), slave]
os.execvp(argv[0], argv)
os.close(ix)
os.close(oy)