From b5fd1bca37ce612f825295ed03ac0544cf7e0b69 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Tue, 23 Jun 2015 18:28:56 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/11367 Tested-by: NetBSD Build System Reviewed-by: Aravinda VK --- geo-replication/syncdaemon/master.py | 4 ++-- 1 file 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) -- cgit