cb8e9e
From f37ec5bcb6391ed5b6e3113667d2c6f19eb12fdf Mon Sep 17 00:00:00 2001
cb8e9e
From: Kotresh HR <khiremat@redhat.com>
cb8e9e
Date: Tue, 23 Jun 2015 18:28:56 +0530
cb8e9e
Subject: [PATCH 135/190] geo-rep: Fix geo-rep fanout setup with meta volume
cb8e9e
cb8e9e
Lock filename was formed with 'master volume id'
cb8e9e
and 'subvol number'. Hence multiple slaves try
cb8e9e
acquiring lock on same file and become PASSIVE
cb8e9e
ending up not syncing data. Using 'slave volume id'
cb8e9e
in lock filename will fix the issue making lock
cb8e9e
file unique across different slaves.
cb8e9e
cb8e9e
BUG: 1234419
cb8e9e
Change-Id: I366fc746f0f745b9a4590bb41839900c0a7b7071
cb8e9e
Reviewed-on: http://review.gluster.org/11367
cb8e9e
Reviewed-on: http://review.gluster.org/11366
cb8e9e
Reviewed-by: Aravinda VK <avishwan@redhat.com>
cb8e9e
Signed-off-by: Kotresh HR <khiremat@redhat.com>
cb8e9e
Reviewed-on: https://code.engineering.redhat.com/gerrit/51566
cb8e9e
Reviewed-by: Venky Shankar <vshankar@redhat.com>
cb8e9e
Tested-by: Venky Shankar <vshankar@redhat.com>
cb8e9e
---
cb8e9e
 geo-replication/syncdaemon/master.py |    4 ++--
cb8e9e
 1 files changed, 2 insertions(+), 2 deletions(-)
cb8e9e
cb8e9e
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py
cb8e9e
index e05dc37..dc54de3 100644
cb8e9e
--- a/geo-replication/syncdaemon/master.py
cb8e9e
+++ b/geo-replication/syncdaemon/master.py
cb8e9e
@@ -442,8 +442,8 @@ class GMasterCommon(object):
cb8e9e
 
cb8e9e
     def mgmt_lock(self):
cb8e9e
         """Take management volume lock """
cb8e9e
-        bname = str(self.uuid) + "_subvol_" + str(gconf.subvol_num) \
cb8e9e
-            + ".lock"
cb8e9e
+        bname = str(self.uuid) + "_" + str(gconf.slave_id) + "_subvol_" \
cb8e9e
+            + str(gconf.subvol_num) + ".lock"
cb8e9e
         mgmt_lock_dir = os.path.join(gconf.meta_volume_mnt, "geo-rep")
cb8e9e
         path = os.path.join(mgmt_lock_dir, bname)
cb8e9e
         logging.debug("lock_file_path: %s" % path)
cb8e9e
-- 
cb8e9e
1.7.1
cb8e9e