From 90f5a6cd669660785213a187c9fa7a587cd15257 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. Change-Id: I64c84670a5d9e1b0dfbdeb4479ee6b8e0c6b829e BUG: 1234898 Reviewed-On: http://review.gluster.org/11367 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/11366 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Saravanakumar Arumugam Reviewed-by: Venky Shankar --- geo-replication/syncdaemon/master.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'geo-replication') 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) -- cgit