summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/utils/syncdaemon/gsyncd.py1
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/gsyncd.py b/xlators/features/marker/utils/syncdaemon/gsyncd.py
index 9e9469469..d7deca86c 100644
--- a/xlators/features/marker/utils/syncdaemon/gsyncd.py
+++ b/xlators/features/marker/utils/syncdaemon/gsyncd.py
@@ -173,6 +173,7 @@ def main_i():
op.add_option('--sync-jobs', metavar='N', type=int, default=3)
op.add_option('--turns', metavar='N', type=int, default=0, help=SUPPRESS_HELP)
op.add_option('--allow-network', metavar='IPS', default='')
+ op.add_option('--socketdir', metavar='DIR')
op.add_option('--state-socket-unencoded', metavar='SOCKF', type=str, action='callback', callback=store_abs)
op.add_option('--checkpoint', metavar='LABEL', default='')
# tunables for failover/failback mechanism:
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index 336f59207..19cb09e7b 100644
--- a/xlators/features/marker/utils/syncdaemon/master.py
+++ b/xlators/features/marker/utils/syncdaemon/master.py
@@ -496,10 +496,12 @@ class GMasterBase(object):
def start_checkpoint_thread(self):
"""prepare and start checkpoint service"""
- if self.checkpoint_thread or not getattr(gconf, 'state_socket_unencoded', None):
+ if self.checkpoint_thread or not (
+ getattr(gconf, 'state_socket_unencoded', None) and getattr(gconf, 'socketdir', None)
+ ):
return
chan = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- state_socket = "/tmp/%s.socket" % md5(gconf.state_socket_unencoded).hexdigest()
+ state_socket = os.path.join(gconf.socketdir, md5(gconf.state_socket_unencoded).hexdigest() + ".socket")
try:
os.unlink(state_socket)
except: