b7d4d7
From 17a2a880290d2038c913c23985df620e3c9741b3 Mon Sep 17 00:00:00 2001
b7d4d7
From: Sunny Kumar <sunkumar@redhat.com>
b7d4d7
Date: Mon, 16 Mar 2020 15:17:23 +0000
b7d4d7
Subject: [PATCH 495/511] geo-rep: descriptive message when worker crashes due
b7d4d7
 to EIO
b7d4d7
b7d4d7
With this patch now you can notice log if it is due to EIO:
b7d4d7
b7d4d7
[2020-03-16 16:24:48.293837] E [syncdutils(worker /bricks/brick1/mbr3):348:log_raise_exception] <top>: Getting "Input/Output error" is most likely due to a. Brick is down or b. Split brain issue.
b7d4d7
[2020-03-16 16:24:48.293915] E [syncdutils(worker /bricks/brick1/mbr3):352:log_raise_exception] <top>: This is expected as per design to keep the consistency of the file system. Once the above issue is resolved geo-rep would automatically proceed further.
b7d4d7
b7d4d7
>Change-Id: Ie33f2440bc96089731ce12afa8dab91d9550a7ca
b7d4d7
>Fixes: #1104
b7d4d7
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
b7d4d7
>Upstream Patch : https://review.gluster.org/c/glusterfs/+/24228/
b7d4d7
b7d4d7
BUG: 1412494
b7d4d7
Change-Id: Ie33f2440bc96089731ce12afa8dab91d9550a7ca
b7d4d7
Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
b7d4d7
Reviewed-on: https://code.engineering.redhat.com/gerrit/220874
b7d4d7
Tested-by: RHGS Build Bot <nigelb@redhat.com>
b7d4d7
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
b7d4d7
---
b7d4d7
 geo-replication/syncdaemon/syncdutils.py | 13 ++++++++++++-
b7d4d7
 1 file changed, 12 insertions(+), 1 deletion(-)
b7d4d7
b7d4d7
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
b7d4d7
index f43e13b..d5a94d4 100644
b7d4d7
--- a/geo-replication/syncdaemon/syncdutils.py
b7d4d7
+++ b/geo-replication/syncdaemon/syncdutils.py
b7d4d7
@@ -22,7 +22,7 @@ import socket
b7d4d7
 from subprocess import PIPE
b7d4d7
 from threading import Lock, Thread as baseThread
b7d4d7
 from errno import EACCES, EAGAIN, EPIPE, ENOTCONN, ENOMEM, ECONNABORTED
b7d4d7
-from errno import EINTR, ENOENT, ESTALE, EBUSY, ENODATA, errorcode
b7d4d7
+from errno import EINTR, ENOENT, ESTALE, EBUSY, ENODATA, errorcode, EIO
b7d4d7
 from signal import signal, SIGTERM
b7d4d7
 import select as oselect
b7d4d7
 from os import waitpid as owaitpid
b7d4d7
@@ -346,6 +346,17 @@ def log_raise_exception(excont):
b7d4d7
                                                         ECONNABORTED):
b7d4d7
             logging.error(lf('Gluster Mount process exited',
b7d4d7
                              error=errorcode[exc.errno]))
b7d4d7
+        elif isinstance(exc, OSError) and exc.errno == EIO:
b7d4d7
+            logging.error("Getting \"Input/Output error\" "
b7d4d7
+                          "is most likely due to "
b7d4d7
+                          "a. Brick is down or "
b7d4d7
+                          "b. Split brain issue.")
b7d4d7
+            logging.error("This is expected as per design to "
b7d4d7
+                          "keep the consistency of the file system. "
b7d4d7
+                          "Once the above issue is resolved "
b7d4d7
+                          "geo-replication would automatically "
b7d4d7
+                          "proceed further.")
b7d4d7
+            logtag = "FAIL"
b7d4d7
         else:
b7d4d7
             logtag = "FAIL"
b7d4d7
         if not logtag and logging.getLogger().isEnabledFor(logging.DEBUG):
b7d4d7
-- 
b7d4d7
1.8.3.1
b7d4d7