12a457
From 9710b5edaf152142f548e04304f2ea3c1a290fe9 Mon Sep 17 00:00:00 2001
12a457
From: Aravinda VK <avishwan@redhat.com>
12a457
Date: Tue, 19 Apr 2016 15:30:19 +0530
12a457
Subject: [PATCH 100/104] geo-rep: Fix checkpoint issue in scheduler
12a457
12a457
If checkpoint is not met, Scheduler script should touch the
12a457
Mount point so that SETATTR will get recorded in every brick
12a457
Changelog. Script was not touching the mount point in each iteration.
12a457
12a457
BUG: 1328397
12a457
Change-Id: I2718a764fb3e550742c9dcd316724683561ddf18
12a457
Signed-off-by: Aravinda VK <avishwan@redhat.com>
12a457
Reviewed-on: http://review.gluster.org/14029
12a457
Reviewed-on: http://review.gluster.org/14071
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/73033
12a457
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
12a457
---
12a457
 extras/geo-rep/schedule_georep.py |   26 +++++++++++---------------
12a457
 1 files changed, 11 insertions(+), 15 deletions(-)
12a457
12a457
diff --git a/extras/geo-rep/schedule_georep.py b/extras/geo-rep/schedule_georep.py
12a457
index 9b9b131..74fc693 100644
12a457
--- a/extras/geo-rep/schedule_georep.py
12a457
+++ b/extras/geo-rep/schedule_georep.py
12a457
@@ -131,11 +131,9 @@ def glustermount(hostname, volname):
12a457
     """
12a457
     mnt = tempfile.mkdtemp(prefix="georepsetup_")
12a457
     execute(["glusterfs",
12a457
-             "--xlator-option=\"*dht.lookup-unhashed=off\"",
12a457
              "--volfile-server", hostname,
12a457
              "--volfile-id", volname,
12a457
              "-l", SESSION_MOUNT_LOG_FILE,
12a457
-             "--client-pid=-1",
12a457
              mnt],
12a457
             failure_msg="Unable to Mount Gluster Volume "
12a457
             "{0}:{1}".format(hostname, volname))
12a457
@@ -412,29 +410,27 @@ def main(args):
12a457
                       "All status {2} (Turns {0:>3})".format(
12a457
                           turns, chkpt_status, ok_status))
12a457
         else:
12a457
-            if not summary["checkpoints_ok"]:
12a457
-                # If Checkpoint is not complete after a iteration means brick
12a457
-                # was down and came online now. SETATTR on mount is not
12a457
-                # recorded, So again issue touch on mount root So that
12a457
-                # Stime will increase and Checkpoint will complete.
12a457
-                touch_mount_root(args.mastervol)
12a457
-
12a457
             output_warning("All Checkpoints {1}, "
12a457
                            "All status {2} (Turns {0:>3})".format(
12a457
                                turns, chkpt_status, ok_status))
12a457
 
12a457
+            output_warning("Geo-rep workers Faulty/Offline, "
12a457
+                           "Faulty: {0} Offline: {1}".format(
12a457
+                               repr(faulty_rows),
12a457
+                               repr(down_rows)))
12a457
+
12a457
         if summary["checkpoints_ok"]:
12a457
             output_ok("Stopping Geo-replication session now")
12a457
             cmd = ["gluster", "volume", "geo-replication", args.mastervol,
12a457
                    "%s::%s" % (args.slave, args.slavevol), "stop"]
12a457
             execute(cmd)
12a457
             break
12a457
-
12a457
-        if not summary["ok"]:
12a457
-            output_warning("Geo-rep workers Faulty/Offline, "
12a457
-                           "Faulty: {0} Offline: {1}".format(
12a457
-                               repr(faulty_rows),
12a457
-                               repr(down_rows)))
12a457
+        else:
12a457
+            # If Checkpoint is not complete after a iteration means brick
12a457
+            # was down and came online now. SETATTR on mount is not
12a457
+            # recorded, So again issue touch on mount root So that
12a457
+            # Stime will increase and Checkpoint will complete.
12a457
+            touch_mount_root(args.mastervol)
12a457
 
12a457
         # Increment the turns and Sleep for 10 sec
12a457
         turns += 1
12a457
-- 
12a457
1.7.1
12a457