summaryrefslogtreecommitdiffstats
path: root/geo-replication
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-06-23 18:28:56 +0530
committerVijay Bellur <vbellur@redhat.com>2015-06-24 20:14:01 -0700
commitb5fd1bca37ce612f825295ed03ac0544cf7e0b69 (patch)
tree80c89d99afac9f0b37f4e2833c0172af5deecf9d /geo-replication
parent4c751009f668910a734cd400c10e8b3bdd6360a1 (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. BUG: 1234882 Change-Id: Ie3590b36ed03e80d74c0cfc1290dd72122a3b4b1 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11367 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'geo-replication')
-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 e05dc376662..dc54de39be1 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)