summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-06-23 18:28:56 +0530
committerVenky Shankar <vshankar@redhat.com>2015-06-25 10:27:28 -0700
commit90f5a6cd669660785213a187c9fa7a587cd15257 (patch)
tree7c2e5d2c0ab2e2e9d4c9efa0a12c129fa654dcdc /geo-replication/syncdaemon
parentbdf54579c5cfcc9feb7dc824a5a58255ae14007b (diff)
geo-rep: Fix geo-rep fanout setup with meta volume
Lock filename was formed with 'master volume id' and 'subvol number'. Hence multiple slaves try acquiring lock on same file and become PASSIVE ending up not syncing data. Using 'slave volume id' in lock filename will fix the issue making lock file unique across different slaves. Change-Id: I64c84670a5d9e1b0dfbdeb4479ee6b8e0c6b829e BUG: 1234898 Reviewed-On: http://review.gluster.org/11367 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11366 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon')
-rw-r--r--geo-replication/syncdaemon/master.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
index ec79f823ed3..6c96a02a74b 100644
--- a/geo-replication/syncdaemon/master.py
+++ b/geo-replication/syncdaemon/master.py
@@ -442,8 +442,8 @@ class GMasterCommon(object):
def mgmt_lock(self):
"""Take management volume lock """
- bname = str(self.uuid) + "_subvol_" + str(gconf.subvol_num) \
- + ".lock"
+ bname = str(self.uuid) + "_" + str(gconf.slave_id) + "_subvol_" \
+ + str(gconf.subvol_num) + ".lock"
mgmt_lock_dir = os.path.join(gconf.meta_volume_mnt, "geo-rep")
path = os.path.join(mgmt_lock_dir, bname)
logging.debug("lock_file_path: %s" % path)