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