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