e7a346
From f34c2d392ad7e115dac0d146ec466fc218e060e3 Mon Sep 17 00:00:00 2001
e7a346
From: Kotresh HR <khiremat@redhat.com>
e7a346
Date: Thu, 18 Jan 2018 22:59:00 -0500
e7a346
Subject: [PATCH 151/180] geo-rep: Improve geo-rep pre-validation logs
e7a346
e7a346
Geo-rep runs gverify.sh which does pre-validation.
e7a346
As part of it, master and slave volume is mounted
e7a346
to verify the size. If for some reason, the mount
e7a346
fails, the error message does not point out the
e7a346
mount log file location. Also both master and
e7a346
slave mount logs are same.
e7a346
e7a346
Patch does following improvements.
e7a346
e7a346
1. Master and slave mount logs are separated and
e7a346
   error message points the log file to be looked for.
e7a346
2. The log location is changed to /var/log/glusterfs/geo-replication
e7a346
   instead of /var/log/glusterfs/geo-replication-slaves
e7a346
3. The log file name is changed to "gverify-mastermnt.log" and
e7a346
   "gverify-slavemnt.log" for master and slave mount respectively
e7a346
e7a346
Upstream Patch: https://review.gluster.org/19242
e7a346
BUG: 1541122
e7a346
Change-Id: Ia644ec0afebbdaae92e01adf03c635e5f8866a02
e7a346
Signed-off-by: Kotresh HR <khiremat@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/130065
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
Tested-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 geo-replication/src/gverify.sh | 9 +++++----
e7a346
 1 file changed, 5 insertions(+), 4 deletions(-)
e7a346
e7a346
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh
e7a346
index 9b1328a..728ce07 100755
e7a346
--- a/geo-replication/src/gverify.sh
e7a346
+++ b/geo-replication/src/gverify.sh
e7a346
@@ -7,7 +7,8 @@
e7a346
 # Considering buffer_size 100MB
e7a346
 BUFFER_SIZE=104857600;
e7a346
 SSH_PORT=$5;
e7a346
-slave_log_file=`gluster --print-logdir`/geo-replication-slaves/slave.log
e7a346
+master_log_file=`gluster --print-logdir`/geo-replication/gverify-mastermnt.log
e7a346
+slave_log_file=`gluster --print-logdir`/geo-replication/gverify-slavemnt.log
e7a346
 
e7a346
 function SSHM()
e7a346
 {
e7a346
@@ -93,7 +94,7 @@ function master_stats()
e7a346
     local m_status;
e7a346
 
e7a346
     d=$(mktemp -d -t ${0##*/}.XXXXXX 2>/dev/null);
e7a346
-    glusterfs -s localhost --xlator-option="*dht.lookup-unhashed=off" --volfile-id $MASTERVOL -l $slave_log_file $d;
e7a346
+    glusterfs -s localhost --xlator-option="*dht.lookup-unhashed=off" --volfile-id $MASTERVOL -l $master_log_file $d;
e7a346
     i=$(get_inode_num $d);
e7a346
     if [[ "$i" -ne "1" ]]; then
e7a346
         echo 0:0;
e7a346
@@ -190,12 +191,12 @@ function main()
e7a346
     slave_no_of_files=$(echo $slave_data | cut -f4 -d':');
e7a346
 
e7a346
     if [[ "x$master_disk_size" = "x" || "x$master_version" = "x" || "$master_disk_size" -eq "0" ]]; then
e7a346
-        echo "FORCE_BLOCKER|Unable to fetch master volume details. Please check the master cluster and master volume." > $log_file;
e7a346
+        echo "FORCE_BLOCKER|Unable to mount and fetch master volume details. Please check the log: $master_log_file" > $log_file;
e7a346
 	exit 1;
e7a346
     fi;
e7a346
 
e7a346
     if [[ "x$slave_disk_size" = "x" || "x$slave_version" = "x" || "$slave_disk_size" -eq "0" ]]; then
e7a346
-	echo "FORCE_BLOCKER|Unable to fetch slave volume details. Please check the slave cluster and slave volume." > $log_file;
e7a346
+	echo "FORCE_BLOCKER|Unable to mount and fetch slave volume details. Please check the log: $slave_log_file" > $log_file;
e7a346
 	exit 1;
e7a346
     fi;
e7a346
 
e7a346
-- 
e7a346
1.8.3.1
e7a346