summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/master.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2012-10-30 15:54:05 +0100
committerVijay Bellur <vbellur@redhat.com>2012-10-31 09:47:13 -0400
commit61c8fa54e596eab121d44569c5eec2717865a87d (patch)
tree6bd56fae80c82024a6dcadc3403d6756e1dd6955 /xlators/features/marker/utils/syncdaemon/master.py
parent371f778ecb71bec24391b1dfac4a30cd3ba059d7 (diff)
geo-rep / gsyncd,glusterd: do not hardcode socket path
... in gsyncd python code. Indeed, use the configuration mechanism to set it suitably from glusterd. Change-Id: I9fe2088b14d28588d1e64fe892740cc5755b8365 BUG: 868877 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/173 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/master.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index 93013912e6a..6ed24d6a6ea 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: