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