summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2016-04-19 15:30:19 +0530
committerAravinda VK <avishwan@redhat.com>2016-04-29 03:17:57 -0700
commit6ca8c94bc614a2fade8aeb49340a59b1195e310c (patch)
tree31f9d59c61292bb0870c22e295294a5802e6f79e /extras
parent6659ff9b81ba0f47e7dd85f947cb8ed5bb41ac26 (diff)
geo-rep: Fix checkpoint issue in scheduler
If checkpoint is not met, Scheduler script should touch the Mount point so that SETATTR will get recorded in every brick Changelog. Script was not touching the mount point in each iteration. BUG: 1330450 Change-Id: I2718a764fb3e550742c9dcd316724683561ddf18 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14029 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit 8590c1cf3c27468177c425c920cab01f52b251e5) Reviewed-on: http://review.gluster.org/14071
Diffstat (limited to 'extras')
-rw-r--r--extras/geo-rep/schedule_georep.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/extras/geo-rep/schedule_georep.py b/extras/geo-rep/schedule_georep.py
index 9b9b131f474..74fc6934263 100644
--- a/extras/geo-rep/schedule_georep.py
+++ b/extras/geo-rep/schedule_georep.py
@@ -131,11 +131,9 @@ def glustermount(hostname, volname):
"""
mnt = tempfile.mkdtemp(prefix="georepsetup_")
execute(["glusterfs",
- "--xlator-option=\"*dht.lookup-unhashed=off\"",
"--volfile-server", hostname,
"--volfile-id", volname,
"-l", SESSION_MOUNT_LOG_FILE,
- "--client-pid=-1",
mnt],
failure_msg="Unable to Mount Gluster Volume "
"{0}:{1}".format(hostname, volname))
@@ -412,29 +410,27 @@ def main(args):
"All status {2} (Turns {0:>3})".format(
turns, chkpt_status, ok_status))
else:
- if not summary["checkpoints_ok"]:
- # If Checkpoint is not complete after a iteration means brick
- # was down and came online now. SETATTR on mount is not
- # recorded, So again issue touch on mount root So that
- # Stime will increase and Checkpoint will complete.
- touch_mount_root(args.mastervol)
-
output_warning("All Checkpoints {1}, "
"All status {2} (Turns {0:>3})".format(
turns, chkpt_status, ok_status))
+ output_warning("Geo-rep workers Faulty/Offline, "
+ "Faulty: {0} Offline: {1}".format(
+ repr(faulty_rows),
+ repr(down_rows)))
+
if summary["checkpoints_ok"]:
output_ok("Stopping Geo-replication session now")
cmd = ["gluster", "volume", "geo-replication", args.mastervol,
"%s::%s" % (args.slave, args.slavevol), "stop"]
execute(cmd)
break
-
- if not summary["ok"]:
- output_warning("Geo-rep workers Faulty/Offline, "
- "Faulty: {0} Offline: {1}".format(
- repr(faulty_rows),
- repr(down_rows)))
+ else:
+ # If Checkpoint is not complete after a iteration means brick
+ # was down and came online now. SETATTR on mount is not
+ # recorded, So again issue touch on mount root So that
+ # Stime will increase and Checkpoint will complete.
+ touch_mount_root(args.mastervol)
# Increment the turns and Sleep for 10 sec
turns += 1